Friday, January 4, 2019

Schedule a Scheduled Script with Dynamic Parameters

The third parameter of nlapiScheduleScript is an array of parameters which can be passed dynamically as such:

var myParams = [];
myParams.custscript_param1 = 12;
nlapiScheduleScript(scriptId, deployId, myParams)

You have to make sure though that you have created the script parameters beforehand under the Script record (Customization > Scripting > Scripts > Edit the Scheduled script record > Parameters tab)

No comments:

Post a Comment