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.
Please note that on Saturday, April 18, 2026, at 8:00 PM Pacific Time, our Case Management System will undergo a scheduled maintenance for approximately 15 minutes. During this time, case creation via SuiteAnswers will be unavailable and inbound calls will be routed to Customer Service.
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