Modules

filter

 

Objects/Functions

module (N/action)

SuiteScript 2.0

Action(options)

Action({Object: {Object},})

N/action Module
Action()
Method Description: Executes the action and returns the action result in a plain JavaScript object. The action result is returned in an object. The response property of the results object shows the action result. If the action fails, it is listed in the results object’s notifications property. If the action executes successfully, the notifications property is usually empty. 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 recordId and the options.params.recordId parameter is optional. If options.params.recordId is provided during execution, it takes precedence over the recordId stored in the Action object. Replace Action with the name of the action you are executing.
Returns: Object
Supported Script Types: Client and server scripts For additional information, see SuiteScript 2.0 Script Types.
Governance: None
Module: N/action Module
Parent Object: action.Action
Sibling Object Members: Action Object Members
Since: 2018.2
Search NetSuite - https://system.netsuite.com/app/help/helpcenter.nl?search=Action(options)

Example:

// Code Example 1
// Add additional code
//...
var result = action({recordId: 1});
//...
// Add additional code

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