[英]Netsuite User Event Script: Not all user event types firing
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. 我们在NetSuite中附加了一个销售订单的用户事件脚本,但是我们注意到只调用了context.UserEventType.CREATE 。 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.
我附加了一个非常简单的UserEvent脚本,该脚本应抛出上下文类型,但它不起作用。
This UserEvent script is for a salesorder record: 此UserEvent脚本用于销售订单记录:
/**
*@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.
检查部署并查看事件类型是否设置为仅创建。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.