Discussions
Stay up-to-date with the latest news from NetSuite. You’ll be in the know about how to connect with peers and take your business to new heights at our virtual, in-person, on demand events, and much more.
New AI Community Guidelines. Please review and follow them to ensure AI use stays safe, accurate, and compliant.
Update: Narrative Insights has been restored and is now available.
Narrative Insights is Temporarily Unavailable due to an Infrastructure Issue. Learn how This Impacts Your Account and What to Expect While the Feature is Disabled.
Narrative Insights is Temporarily Unavailable due to an Infrastructure Issue. Learn how This Impacts Your Account and What to Expect While the Feature is Disabled.
Trigger Schedule script and getParameters
I've written a script that basically makes a report from a saved search, while changing one field on all the search results. I want to use a user event trigger to start the scheduled script, but trying to get the parameters is just giving me a null value. Here is the trigger code:
var dashrec = scriptContext.newRecord; var acctperiod = dashrec.getValue('custrecordaccountingperiod'); var acctperiodname = dashrec.getText('custrecordaccountingperiod'); var rollBillCredits = dashrec.getValue('custrecord55'); if(rollBillCredits == true){ var scheduleRBC = task.create({ taskType: task.TaskType.SCHEDULED_SCRIPT }); scheduleRBC.scriptId = 'customscript410'; scheduleRBC.deploymentId = 'customdeploy1'; scheduleRBC.params = { custrecordaccountingperiod: acctperiod // custrecordaccountingperiod: { // value: acctperiod, // name: acctperiodname // } } var taskId = scheduleRBC.submit(); } 0