I created a super basic user event script for Sales Order records, shown below. I enabled every execution context and have not set an Event Type filter.
The script executes as expected for events involving the Sales Order record itself, but it does not fire when a modification is made directly to a line item on the Sales Order record. For example, if inventory is committed or reallocated, these actions do not trigger the script.
Are sublist modifications not candidates for user event scripts?
/**
*@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
};
});