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