Action.execute.promise(options)
|
Method Description |
Executes the action asynchronously and returns the action result in a plain JavaScript object. The action result is returned in an object. The If the Action object is qualified (it is a result of an action.get() or action.find() call that provides the recordId), then it is not required to provide a
Note:
The parameters and errors thrown for this method are the same as those for Action.execute(options). For more information about promises, see Promise Object. |
|
Returns |
|
|
Synchronous Version |
|
|
Supported Script Types |
Client scripts For more information, see SuiteScript 2.x Script Types. |
|
Governance |
None |
|
Module |
|
|
Parent Object |
|
|
Sibling Object Members |
|
|
Since |
2018.2 |
Parameters
The parameters that are required vary for action types. The only parameter that is always required is options.recordid, unless the action object is qualified. An action object is qualified if it is the result of an action.get() or action.find() call that provides the recordId.
|
Parameter |
Type |
Required / Optional |
Description |
|---|---|---|---|
|
|
Object |
required or optional |
The parameters that need to be provided depend on the action implementation. See the action help. |
|
|
string |
required or optional |
The record instance ID of the record on which the action is to be performed. This is the NetSuite record internal ID. |
Errors
|
Error Code |
Thrown If |
|---|---|
|
|
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 promise script example, see Promise Object.
// Add additional code
...
action.execute.promise({
recordId: 1
}).then(function(result) {
// Process result here
});
...
// Add additional code