We have a user event script attached to a sales order in NetSuite, however we are noticing that only the context.UserEventType.CREATE is being called. EDIT , COPY and the others DO NOT catch the sales order manipulations as per spec. Can anyone please verify this. Ive attached a very simple UserEvent script that should throw the context type but it is not working.
This UserEvent script is for a salesorder record:
/**
*@NApiVersion 2.x
*@NScriptType UserEventScript
*/
define(["N/record", "N/search"],
function (record, search) {
function beforeSubmit(context) {
throw "beforeSubmit:" + context.type;
}
function afterSubmit(context) {
throw "afterSubmit:" + context.type;
}
function beforeLoad(context) {
throw "beforeLoad:" + context.type;
}
return {
beforeLoad: beforeLoad,
beforeSubmit: beforeSubmit,
afterSubmit: afterSubmit
};
});
The code looks good. Check the deployment and see if the event type is set to create only.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.