Script.getParameter(options)
Method Description |
Returns the value of a script parameter for the currently executing script. For information about script parameters, see Creating Script Parameters Overview. |
Returns |
number | Date | string | boolean | null | undefined |
Supported Script Types |
Client and server scripts For more information, see SuiteScript 2.x Script Types. |
Governance |
None |
Module |
|
Since |
2015.2 |
Parameters
The options
parameter is a JavaScript object.
Parameter |
Type |
Required / Optional |
Description |
Since |
---|---|---|---|---|
|
string |
required |
The name of the script parameter. |
2015.2 |
Errors
Error Code |
Thrown If |
---|---|
|
The |
|
The value for the |
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();
log.debug('Script parameter of custscript1: ' +
scriptObj.getParameter({name: 'custscript1'}));
...
// Add additional code