Fulfill and bill sales orders each day
This sample is a scheduled script that fulfills and bills sales orders created each day.
The conversion of this script from SuiteScript 1.0 to SuiteScript 2.0 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/search and N/record modules. -
The
returnstatement is added with theonRequestentry point. -
The
nlobjSearchFilterfunction is changed to thesearch.createFiltermethod. -
The
nlobjSearchColumnfunction is changed to thesearch.createColumnmethod. -
The
nlapiSearchRecordfunction is changed to thesearch.run.eachmethod. -
The
nlapiTransformRecordfunction is changed to therecord.transformmethod. -
The
nlapiSubmitRecordfunction is changed to theRecord.savemethod.
|
SuiteScript 1.0 Script |
SuiteScript 2.0 Script |
|---|---|
|
|