【发布时间】:2020-02-10 22:59:03
【问题描述】:
我为销售订单记录创建了一个超级基本的用户事件脚本,如下所示。我启用了每个执行上下文并且没有设置事件类型过滤器。
对于涉及销售订单记录本身的事件,该脚本按预期执行,但当直接对销售订单记录上的行项目进行修改时,它不会触发。例如,如果提交或重新分配库存,这些操作不会触发脚本。
子列表修改不是用户事件脚本的候选吗?
/**
*@NApiVersion 2.x
*@NScriptType UserEventScript
*/
define(["N/record", "N/log"],
function (record, log) {
function beforeSubmit(context) {
log.debug("beforeSubmit:" + context.type);
}
function afterSubmit(context) {
log.debug("afterSubmit:" + context.type);
}
function beforeLoad(context) {
log.debug("beforeLoad:" + context.type);
}
return {
beforeLoad: beforeLoad,
beforeSubmit: beforeSubmit,
afterSubmit: afterSubmit
};
});
【问题讨论】:
标签: netsuite suitescript suitescript2.0