Record.getMacro(options)
Method Description |
Provides a macro to be executed. For information about record macros, see Overview of Record Action and Macro APIs. |
Returns |
Function to be executed for the macro. |
Supported Script Types |
Client and server scripts For more information, see SuiteScript 2.x Script Types. |
Governance |
None |
Module |
|
Sibling Object Members |
|
Since |
2018.2 |
Parameters
The options parameter is a JavaScript object.
Parameter |
Type |
Required / Optional |
Description |
---|---|---|---|
|
string |
required |
The macro ID. |
Errors
Error Code |
Thrown If |
---|---|
|
A macro does not exist on the record. |
|
A required parameter is missing. |
Syntax
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
...
var macro = recordObj.getMacro({id: 'calculateTax'});
...
// Add additional code