Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * User Event 2.0 example detailing usage of the Submit events
- *
- @NApiVersion 2.x
- @NModuleScope SameAccount
- @NScriptType UserEventScript
- @appliedtorecord salesorder
- */
- define(['N/runtime'], function(runtime) {
- var exports = {};
- function afterSubmit(scriptContext) {
- var salesOrder = scriptContext.newRecord;
- var prevSalesOrder = scriptContext.oldRecord;
- var status = salesOrder.getValue({ fieldId: 'status' });
- var prevStatus = prevSalesOrder.getValue({ fieldId: 'status' });
- log.audit({ title: 'New', details: status });
- log.audit({ title: 'Old', details: prevStatus });
- }
- exports.afterSubmit = afterSubmit;
- return exports;
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement