Macro.promise(options)

Note:

The content in this help topic pertains to SuiteScript 2.0.

Method Description

Performs a macro operation asynchronously.

Note:

Substitute Macro with the name of the macro you are executing.

For information about record macros, see Overview of Record Action and Macro APIs.

Note:

The parameters and errors thrown for this method are the same as those for Macro(options). For more information about promises, see Promise Object.

Returns

Promise Object

Synchronous Version

Macro(options)

Supported Script Types

Client scripts

For additional information, see SuiteScript 2.x Client Script Type.

Governance

None

Module

N/record Module

Parent Object

record.Macro

Sibling Object Members

Macro Object Members

Since

2018.2

Parameters

Note:

The options parameter is a JavaScript object.

Parameter

Type

Required / Optional

Description

options.params

Object

optional

The macro arguments.

Syntax

Important:

The following code sample shows the syntax for this member. It is not a functional example. For a complete promise script example, see Promise Object.

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

        

Related Topics

record.Macro
N/record Module
SuiteScript 2.x Modules
SuiteScript 2.x

General Notices