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.
Field not being Updated - AfterSubmit
Hi,
Simple scenario:
When new customers are being created (only), copy the salesrep field to a custom field:
[SIZE=2][COLOR=#3f5fbf]
"After Submit Event Script"[/COLOR][/SIZE]
function origrep_AfterSubmit(type){ //Only execute the logic if a new customer is created if(type == 'create') { //Obtain a handle to the newly created customer record var custRec = nlapiGetNewRecord(); if(custRec.getFieldValue('salesrep') != null) { salesrep = custRec.getFieldValue('salesrep'); custRec.setFieldValue('custentity_origrep', salesrep); }thanks for your help![SIZE=2][COLOR=#5c5c5c]
[/COLOR][/SIZE]
0