Saturday, September 15, 2018

Provide a dynamic integration variables on portlet and suitelet connection points for SuiteSignOn

A NetSuite user would like to use dynamic integration variables on Portlet and Suitelet type of connection points. However, this is not possible since dynamic integration variables can only be used on Subtab type of connection points.

 
The customer can create his own dynamic integration variables on the portlet and/or suitelet code itself. Here is how:
 
 

function SSOPortlet(portlet, column) {
portlet.setTitle('Dynamic Integration Variable Sample');
var url = nlapiOutboundSSO('customsso_sample');
var user = nlapiGetUser();
var subsidiary = nlapiLookupField('entity', user, 'subsidiary');

url = url + '&subsidiary=' + subsidiary;
nlapiLogExecution('DEBUG', 'URL is: ', url);
var htmlContent = '<iframe src="' + url + '" align="center" style="width:100%; height:150; margin:0; border:0; padding:0"></iframe>';

portlet.setHtml(htmlContent);
}



The customer can just concatenate a variable on the url returned by the nlapiOutboundSSO call.
 

No comments:

Post a Comment