runtime.executionContext
Property Description |
The execution context trigger of the current script. Execution contexts provide information about how a script is triggered to execute. For example, a script can be triggered in response to an action in the NetSuite application, or an action occurring in another context, such as a web services integration. You can use execution context filtering to ensure that your scripts are triggered only when necessary. For more information, see Execution Contexts. You can use the
This property uses values from the runtime.ContextType enum. |
Type |
string (read-only) |
Supported Script Types |
Client and server scripts For more information, see SuiteScript 2.x Script Types. |
Module |
|
Since |
2015.2 |
Syntax
The following code sample shows the syntax for this member. It is not a functional example. For a complete script example, see N/runtime Module Script Samples.
// Add additional code
...
if (runtime.executionContext !== runtime.ContextType.USEREVENT)
return;
...
// Add additional code