Modules

filter

 

Objects/Functions

module (N/record)

SuiteScript 2.0

Macro.promise(options)

{Macro}.promise({params: {Object}}).then(function(response){// DO SOMETHING WITH RESPONSE HERE}, function(error){// DO SOMETHING WITH ERROR HERE});

N/record Module
Macro.promise()
Method Description: Performs a macro operation asynchronously. Substitute Macro with the name of the macro you are executing. 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 Macro(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
Parent Object: record.Macro
Sibling Object Members: Macro Object Members
Since: 2018.2
Search NetSuite - https://system.netsuite.com/app/help/helpcenter.nl?search=Macro.promise(options)

Example:

// Code Example 1
// Add additional code
//...
var calculateTax = recordObj.getMacro({id: 'calculateTax'});
calculateTax.promise();
//...
// Add additional code

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