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]