Record.executeMacro(options)

Note:

The content in this help topic pertains to SuiteScript 2.0.

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.

Returns

An object with the macro results or null.

Supported Script Types

Client and server scripts

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

Governance

None

Module

N/record Module

Sibling Object Members

Record Object Members

Since

2018.2

Parameters

Note:

The options parameter is a JavaScript object.

Parameter

Type

Required / Optional

Description

options.id

string

required

The macro ID.

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 script example, see N/record Module Script Samples.

          // Add additional code
...
if ('calculateTax' in macros) {
    macros.calculateTax();
}
...
// Add additional code 

        

Related Topics

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

General Notices