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.
Now is the time to ask your NetSuite-savvy friends and colleagues to join the NetSuite Support Community! Refer now! Click here to watch and learn more!
Stay in the Know
Be sure you're subscribed to NetSuite communication to stay in the know about monthly happenings, updates and announcements. Subscribe
Be sure you're subscribed to NetSuite communication to stay in the know about monthly happenings, updates and announcements. Subscribe
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