redirect.redirect(options)
Method Description |
Sets the redirect to the URL of a Suitelet that is available externally (Suitelets set to Available Without Login on the Script Deployment page). |
Returns |
void |
Supported Script Types |
Suitelets User Event scripts -beforeLoad entry point and synchronous afterSubmit user events. This module does not support beforeSubmit or asynchronous afterSubmit user events. This module is only supported when triggered from the UI. Backend contexts such as CSV Import and Scheduled Scripts are not supported. 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 |
---|---|---|---|
|
string |
required |
The URL of a Suitelet that is available externally.
Note:
For an external URL, Available without Login must be enabled on the Script Deployment page for the Suitelet. |
|
Object |
optional |
Contains additional URL parameters as key-value pairs.
Note:
Parameters cannot be arrays. Use JSON.stringify/JSON.parse instead to handle arrays. |
Syntax
The following code sample shows the syntax for this member. It is not a functional example. For a complete script example, see N/redirect Module Script Sample.
//Add additional code
...
redirect.redirect({
url: '/app/site/hosting/scriplet.nl?script=130&deploy=1',
parameters: {
'custparam_test':'helloWorld'
}
});
...
//Add additional code