Modules

filter

 

Objects/Functions

module (N/record)

SuiteScript 2.0

Record.executeMacro.promise(options)

{Record}.executeMacro.promise({id: {string*},params: {Object}}).then(function(response){// DO SOMETHING WITH RESPONSE HERE}, function(error){// DO SOMETHING WITH ERROR HERE});

N/record Module
Record.executeMacro.promise()
Method Description: Performs macro operation and returns its result in a plain JavaScript object. For information about record macros, see Overview of Record Action and Macro APIs. The parameters and errors thrown for this method are the same as those for Record.executeMacro(options). For more information on promises, see Promise Object.
Returns: Promise Object
Supported Script Types: Client-side scripts For additional information, see SuiteScript 2.0 Client Script Type.
Governance: None
Module: N/record Module
Sibling Object Members: Record Object Members
Since: 2018.2
Search NetSuite - https://system.netsuite.com/app/help/helpcenter.nl?search=Record.executeMacro.promise(options)

Example:

// Code Example 1
// Add additional code
//...
if ('calculateTax' in macros) {
macros.calculateTax.promise();
}
//...
// Add additional code

//SOURCE: https://system.netsuite.com/app/help/helpcenter.nl?fid=section_1510066072.html