RL
05/06/2021, 8:52 AMbattk
05/06/2021, 8:54 AMRL
05/06/2021, 1:22 PM/**
* @NApiVersion 2.x
* @NScriptType Portlet
* @NModuleScope SameAccount
*/
define(['N/url', 'N/record', 'N/currentRecord'],
function(url, record, currentRecord)
/**
* Definition of the Portlet script trigger point.
*
* @param {Object} params
* @param {Portlet} params.portlet - The portlet object used for rendering
* @param {number} params.column - Specifies whether portlet is placed in left (1), center (2) or right (3) column of the dashboard
* @param {string} params.entity - (For custom portlets only) references the customer ID for the selected customer
* @Since 2015.2
*/
function render(params) {
var scheme = 'https://';
var host = url.resolveDomain({
hostType: url.HostType.APPLICATION
});
var currentRecObj = currentRecord.get ();
_*`var abc = currentRecObj.getValue('name_of_field');`*_
newLinkURL= scheme + host + '/app/common/search/searchresults.nl?searchid=12345&Entity_InternalID=' + params.entity + _*abc*_ ;
params.portlet.title = 'test portlet';
params.portlet.html = '<a href="' + newLinkURL + '">New Custom Link</a>' ;
}
return {
render: render
};
});
battk
05/06/2021, 7:25 PMbattk
05/06/2021, 7:25 PMbattk
05/06/2021, 7:27 PMRL
05/06/2021, 8:07 PMbattk
05/06/2021, 8:27 PMRL
05/07/2021, 10:26 AM