Sales Order Record Macro

The sales record type currently supports the autoAssignLocations macro. The Automatic Location Assignment engine processes the sales order and, based on some business rules, sets the best location on each line.

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

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

autoAssignLocations

Corresponding UI Button

Auto Assign Locations

Macro Description

Assigns the location automatically

Returns

Array with the lines with the assigned location

Supported Script Types

Client and server scripts

For additional information, see SuiteScript 2.x Script Types.

Since

2019.2

Macro Syntax

              require(['N/currentRecord'], function(currentRecord) {

    var salesOrder = currentRecord.get();

 

    salesOrder.executeMacro({id:'autoAssignLocations'});

}); 

            

Related Topics

Using Billing Rate Cards
Billing and Invoices
Using Billing Classes
Working with the SuiteScript Records Browser
SuiteScript Supported Records
Lists

General Notices