Supply Change Order Actions

The supply change order record supports the approve and reject actions.

For help working with this record in the UI, see Change Orders.

For information about SuiteScript 2.x record actions, see the following help topics:

approve

Corresponding UI Button

Approve all pending.

Action Description

Approve the Supply Change Order with the given recordId.

Governance

This action performs a simple edit, update, and save record. An approve action updates a tranline, which is a necessary step for the feature.

Exception

Exceptions are thrown when tranline fails to update a tranline fails.

Since

2020.2

reject

Corresponding UI Button

Reject all pending.

Reject all pending and add a note.

Action Description

Reject the Supply Change Order with the given recordId.

Optionally include a note that explains the reason for the rejection.

Governance

This action performs a simple edit, update, and save record.

Exception

Exceptions are thrown when tranline fails to update a tranline fails.

Since

2020.2

Parameters

The recordId is the default input parameter for this action

Syntax

The following code snippet shows the syntax for this action.

            require(['N/action'], function(actionMod) {

     // client example
    actionMod.getActions.promise({recordType: 'supplychangeorder'}).then(function(actions) {
    var approveAction = actions.approve;
    approveAction.promise({recordId: 1}).then(function(result) {
    });
  });

// server example
  var result = actionMod.executeAction({id: 'approve', recordType: 'supplychangeorder', params: {recordId: 1}});
}); 

          

General Notices