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!
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