hi good morning im trying to set the subsidary o...
# suitescript
s
hi good morning im trying to set the subsidary on before load
Copy code
/**
 * @NApiVersion 2.x
 * @NScriptType UserEventScript
 */
define(["N/record"], function (record) {
  function beforeLoad(context) {
    var record = context.newRecord;

    record.setValue({ fieldId: "subsidiary", value: 2 });
    record.setValue({ fieldId: "taxschedule", value: "1" });
    record.setValue({ fieldId: "custitem_fa_amz_flag01", value: 1 });
 
  }

  return {
    beforeLoad: beforeLoad,
  };
});
this is on a item creation and it is available in the ui