Reputation: 265
Have a UserEvent SuiteScript 2.0 which is only firing when the create Support Case is performed in the UI and not when the case is created via Email submission.
/**
* 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;
});
Have tried beforeLoad
& afterSubmit
as well, in addition ModuleScope
tried Public
. Script deployment has all 27 context selected. I see my log in all cases when via the UI. Was also having trouble with getting a workflow to fire during the same event. I have a script which does fire using SuiteScript 1 just fine and so I could extend this one, though I'd prefer to continue working in 2.0.
Upvotes: 1
Views: 828
Reputation: 265
When submitting a Support Case via Email, Script Deployment Status
needs to be set to Released
for the script to trigger.
Upvotes: 2