url.format(options)
|
Method Description |
Creates a serialized representation of an object containing query parameters. Use the returned value to build a URL query string. |
|
Returns |
URL as a string |
|
Supported Script Types |
Client and server scripts For more information, see SuiteScript 2.x Script Types. |
|
Governance |
None |
|
Module |
|
|
Since |
2015.1 |
Parameters
The options parameter is a JavaScript object.
|
Parameter |
Type |
Required / Optional |
Description |
Since |
|---|---|---|---|---|
|
|
string |
required |
The domain name. |
2015.1 |
|
|
Object |
required |
Additional URL parameters as name/value pairs. |
2015.1 |
Syntax
The following code sample shows the syntax for this member. It is not a functional example. For a complete script example, see N/url Module Script Samples.
For a script that uses the following code sample, the returned output is http://fruitland.com?fruit=grape&seedless=true&variety=Concord+Giant&PLU=4272, expressed as a string.
//Add additional code
...
var output = url.format({
domain: 'http://fruitland.com',
params: {
fruit: 'grape',
seedless: true,
variety: 'Concord Giant',
PLU: 4272
}
});
...
//Add additional code