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
Create Task sends email
I've got a scheduled script that runs daily at midnight, It creates a task for each customer result of a search. I'm setting the 'sendemail' field to false, and when I look at the task record. It does set the checkbox to unchecked. However the task is still sending the email to the sales rep. Has anyone run into this issue? Is there something I'm missing? Here is my code of creating a task:
var taskRec = record.create({ type: record.Type.TASK, isDynamic: true, defaultValues: { customform: 72 } }); taskRec.setValue({ fieldId: 'title', value: 'SO Follow Up Task' }); taskRec.setValue({ fieldId: 'company', value: customerId }); taskRec.setValue({ fieldId: 'sendemail', value: false }); taskRec.setValue({ fieldId: 'status', value: 'NOTSTART' }); taskRec.setValue({ fieldId: 'custevent12', value: 22 }); var lookupFields = search.lookupFields({ type : 'customer', id : customerId, columns : ['salesrep', 'email', 'phone'] }); var salesRep = lookupFields.salesrep[0].value; var email = lookupFields.email; var phone = lookupFields.phone; taskRec.setValue({ fieldId: 'assigned', value: salesRep }); taskRec.setValue({ fieldId: 'custevent8', value: email }); taskRec.setValue({ fieldId: 'custevent7', value: phone }); taskRec.save(); 0