NetSuite UserEvent SuiteScript 2.0 未在创建支持案例时触发

NetSuite UserEvent SuiteScript 2.0 not firing on Support Case Create

有一个 UserEvent SuiteScript 2.0,它仅在 UI 中执行创建支持案例时触发,而不是在通过电子邮件提交创建案例时触发。

/**
 * Support Case Users Scripts
 *
 * @NApiVersion 2.x
 * @NScriptType UserEventScript
 * @ModuleScope SameAccount
 *
 */
define(["N/log"], function (log) {
    var exports = {};
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    function beforeSubmit(context) {
        log.debug('before submitting', 'in');
    }
    exports.beforeSubmit = beforeSubmit;
    return exports;
});

也试过 beforeLoad & afterSubmit,另外 ModuleScope 试过 Public。脚本部署已选择所有 27 个上下文。通过 UI,我在所有情况下都能看到我的日志。在同一事件期间启动工作流时也遇到了麻烦。我有一个脚本,它使用 SuiteScript 1 就可以很好地触发,所以我可以扩展这个脚本,尽管我更愿意继续在 2.0 中工作。

通过电子邮件提交支持案例时,脚本部署 Status需要设置为Released用于触发脚本。