Discussions
Call one user-event script from another
I am running into a problem trying to call one user-event script from another user-event script.
I am using an after-submit UE function on a Sales Order, which gets values from the Sales Order and posts to the Customer record. Upon submission of the customer record, using the nlapiSubmitRecord function, I would like to execute a user-event script that fires on the customer record. It works fine in the GUI, but not through scripting.
var customerLoad = nlapiLoadRecord('customer',customerID);
nlapiSubmitRecord(customerLoad);
server_BeforeCustomerSubmit();
The last piece of a code is the function that lives in the UE script that fires on the Customer record, but does not appear to fire. Is the code setup wrong or can you not call another UE script?