Update fields on sales order and estimate records
This sample is a mass update script that updates fields on sales order and estimate records.
The conversion of this script from SuiteScript 1.0 to SuiteScript 2.1 includes the following:
-
JSDoc tags are added at the top of the script to indicate the script version and script type.
-
The
definestatement is added which imports the N/record and N/runtime modules. -
The
returnstatement is added with theeachentry point. -
The
nlapiLoadRecordfunction is changed to therecord.loadmethod. -
The
nlapiGetContextandgetSettingfunctions are changed to theruntime.getCurrentScriptand theruntime.Script.getParametermethods. -
The
setFieldValuemethod is changed to theRecord.setValuemethod. -
The
nlapiSubmitRecordmethod is changed to theRecord.savemethod.
|
SuiteScript 1.0 Script |
SuiteScript 2.1 Script |
|---|---|
|
|