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.
Keep an eye out for upcoming NetSuite events, including meetups, workshops, and webinars. These sessions are a great way to connect with peers, learn from experts, and stay current on the latest NetSuite updates and best practices. Registration links are provided in each event.
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