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.
Sales Rep change comparison in afterSubmit script
Hi, what we are trying to do is send an email alert when a lead is reassigned to a different sales rep. The reassigment is done by a marketing employee.
The script works fine when Team Selling is not enabled.
But when we enable Team Selling the script always take the current employee that is making the reassigment as salesrep field.
What can be done to trigger the sales rep reassigment?
Below I attach the scripts that works fine without Team selling enabled.
function checkReassigment(type){
if (type == 'edit'){
var rec = nlapiGetNewRecord();
var sp = rec.getFieldValue('salesrep');
nlapiLogExecution('debug','New Sales Rep',sp);
0