Tuesday, November 27, 2018

Change the status of a return authorization using SuiteScript

The primary option to change the status of a return authorization from 'Pending Approval' to 'Pending Receipt' is to edit the record through the UI and manually set the Status field to 'Pending Receipt'. An alternative using SuiteScript is to set the 'orderstatus' field of a return authorization to the following values:
Return Authorization StatusSuiteScript value
Pending ApprovalA
Pending ReceiptB

This can be done using either of the following two statements:

nlapiSetFieldValue('orderstatus', 'B');

- or -

nlapiSubmitField('returnauthorization', nlapiGetRecordId(), 'orderstatus', 'B');

No comments:

Post a Comment