USER EVENT SCRIPT 2.0 TO LOAD A RECORD, READ IT’S VALUE AND SET A FIELD VALUE
Category : SuiteScript 2.0
/**
*@NApiVersion 2.x
*@NScriptType UserEventScript
*/
define([‘N/record’,’N/log’], // modules used
function(record,log) {
function afterSubmit(context) {
if (context.type !== context.UserEventType.DELETE)
{
var rec_id