pen one
09/12/2020, 10:36 PM// 2.0 - Fluent
/**
* @NApiVersion 2.x
* @NScriptType UserEventScript
* @NModuleScope SameAccount
*/
define(["N/record"], function (r) {
function onAfterSubmit(context) {
var oldweight = context.newRecord.getValue({ fieldId: 'custbody93' });
log.debug({
title: 'Old Weight',
details: oldweight
});
if (oldweight) {
var fixWeight = context.newRecord;
context.newRecord.setValue('custbody103', 'oldweight');
};
}
return {
afterSubmit: onAfterSubmit
};
});