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
define
statement is added which imports the N/record and N/runtime modules. -
The
return
statement is added with theeach
entry point. -
The
nlapiLoadRecord
function is changed to therecord.load
method. -
The
nlapiGetContext
andgetSetting
functions are changed to theruntime.getCurrentScript
and theruntime.Script.getParameter
methods. -
The
setFieldValue
method is changed to theRecord.setValue
method. -
The
nlapiSubmitRecord
method is changed to theRecord.save
method.
SuiteScript 1.0 Script |
SuiteScript 2.1 Script |
---|---|
|
|