Create an item receipt from a purchase order
This sample is a custom module script that creates an item receipt from a purchase order. This is either a custom module or an individual function within a user event or other server script, so no JSDoc or define statement or return statement or entry point function is needed. But you'll need to load the N/record and N/email modules for the function to work.
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
nlapiTransformRecordfunction is changed to therecord.transformmethod. -
The
getLineItemValuefunction is changed to theRecord.getSublistValuemethod. -
The
setLineItemValuefunction is changed to theRecord.setSublistValuemethod. -
The
nlapiSubmitRecordfunction is changed to theRecord.savemethod. -
The
nlapiSendEmailfunction is changed to theemail.sendmethod.
|
SuiteScript 1.0 Script |
SuiteScript 2.1 Script |
|---|---|
|
|