runtime.getCurrentScript()
The content in this help topic pertains to SuiteScript 2.0.
Method Description |
Returns a runtime.Script object that represents the currently executing script. Use this method to get properties and parameters of the currently executing script and script deployment. If you want to get properties for the session or user, use runtime.getCurrentSession() or runtime.getCurrentUser() instead. |
Returns |
|
Supported Script Types |
Client and server scripts For more information, see SuiteScript 2.x Script Types. |
Governance |
None |
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
...
var scriptObj = runtime.getCurrentScript();
...
// Add additional code