CALL ANOTHER SCRIPT | SUITELET FROM ANY OTHER SCRIPT | SUITELET | ALSO PASSING OF PARAMETERS
Thu Feb 17 2022 17:43:47 GMT+0000 (Coordinated Universal Time)
Saved by
@mdfaizi
//ALWAYS USE custparam_ while passing of parameters like this ,and while getting use this syntaxt to get data:-
var i_Transaction_Id = context.request.parameters.custparam_i_Record_Ids;
log.debug('i_Transaction_Id', i_Transaction_Id);
/////////////////////////////////////////////////////////////////////////////////
redirect.toSuitelet({
scriptId: 'customscript_clb_sl_po_button_bill_opera',
deploymentId: 'customdeploy_clb_sl_po_button_bill_opera',
parameters: {
'custparam_i_Record_Id': poTobeBilledArr[0]
}
});
OR USE THIS:-
THIS IS MAINLY USED FOR CALLING RESTLET:-
define([ 'N/url'],function(obj_Url_Module){
function sample(){
var billLinkPath = obj_Url_Module.resolveScript({
scriptId: 'customscript_clb_sl_po_button_bill_opera',
deploymentId: 'customdeploy_clb_sl_po_button_bill_opera',
/*ALSO can use prams*/ parameters: {
'i_Record_Id': s_internalid
},
returnExternalUrl: false
});
}
}
content_copyCOPY
Comments