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.
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.
Need help with Drip Marketing Script troubleshooting
I have a campaign called "DripMarketingNewUp18monthsago". This campaign targets a dynamic group.
I am trying to execute this campaign on a recurring basis, ie each day at 9AM. I read Yang's great post (search "drip marketing") but was still a little confused. I think I just need to created a scheduled script per below?
function scheduleCampaign( base_campaign ) { var today = nlapiDateToString( new Date() ); var campaign = nlapiCopyRecord('campaign', DripMarketingNewUp18monthsago); campaign.setFieldValue('startdate', today); campaign.setFieldValue('title',campaign.getFieldValue('title') + ' (' + today + ')'); campaign.setLineItemValue('campaignemail','status' ,1,'EXECUTE'); campaign.setLineItemValue('campaignemail','datescheduled',1,today); nlapiSubmitRecord( campaign ); }I get the following error when running the scheduled script (ther error is emailed to me):
0