Slackbot
12/09/2021, 11:35 AMSciuridae54696d
12/09/2021, 12:04 PMSciuridae54696d
12/09/2021, 12:05 PMSciuridae54696d
12/09/2021, 12:05 PMdefine(['N/record','N/runtime'], function (record,runtime) {
/**
*@NApiVersion 2.x
*@NScriptType UserEventScript
*@NModuleScope Public
*/
var userObj = runtime.getCurrentUser();
function beforeLoad(context) {
if (context.type !== context.UserEventType.COPY)
return;
var SalesOrderRecord = context.newRecord;
log.debug('userObj',JSON.stringify(userObj));
SalesOrderRecord.setValue('memo', JSON.stringify(userObj));
}
return {
beforeLoad: beforeLoad
}
});
Sciuridae54696d
12/09/2021, 12:05 PM