module function · N/redirect
toSuitelet()
redirect.toSuitelet(options)
Redirects to a Suitelet.
- Implementation
- Implemented in the compiler, not yet published
- Design
- Accepted
redirect Suitelet(script, deployment)
A
suitescript api
1redirect.toSuitelet({2 scriptId: /* string, required */,3 deploymentId: /* string, required */,4 isExternal: /* boolean, optional */,5 parameters: /* Object, optional */6});
| Parameter | Type | Required | Description |
|---|---|---|---|
| options.scriptId | string | required | The script ID for the Suitelet. |
| options.deploymentId | string | required | The deployment ID for the Suitelet. |
| options.isExternal | boolean | optional | The default value is false - indicates an external Suitelet URL. |
| options.parameters | Object | optional | Contains additional URL parameters as key-value pairs. Note: Parameters cannot be arrays. Use JSON.stringify/JSON.parse instead to handle arrays. |
B
mynt syntax
Supported syntax · compiles today
redirect Suitelet("customscript_customer_portal", "customdeploy_customer_portal")
1redirect.toSuitelet({2 scriptId: "customscript_customer_portal",3 deploymentId: "customdeploy_customer_portal"4});
Internal Suitelets only, with no URL parameters yet. Only in afterSubmit, like every redirect. In the compiler, not yet published: npm 0.1.0 does not have it. Verified with mynt build on 13 Oct 2026.
C
community proposals
Competing syntax for toSuitelet, from GitHub Discussions. Select two or more to compare them side by side, with the syntax Mynt supports today as a baseline.
Mynt today
redirect Suitelet("customscript_customer_portal", "customdeploy_customer_portal")Loading proposals from GitHub…
D
suggest an alternative
Write the Mynt you wish you could write.
A good proposal shows the syntax, the SuiteScript it should become, and argues for it: why it is clearer, how it fits the rest of the language, what it makes harder.
- Clarity. Does it say what happens, without ceremony?
- Consistency. Does it read like
load,saveandRef[field]? - Expressiveness. Does it cover the cases people actually write?
- Honesty. Does it hide a NetSuite cost, such as governance, that a reader should see?