GlideURLV3 - Client

Provides methods for manipulating a URI.

The GlideURLV3 API can be used in client-side scripts using ListV2 and ListV3 APIs.

GlideURLV3 - addParam(String name, String value)

Adds a query string name-value pair to the URL.

Table 1. Parameters
Name Type Description
name String Name of the query string parameter.
value String Query string value.
Table 2. Returns
Type Description
String The GlideURL
var gu = new GlideURL('incident.do');
var url = gu.addParam('sys_id', '-1');

GlideURLV3 - getURL(Object additionalParams)

Get the entire context path and query string parameters as a single URI.

Table 3. Parameters
Name Type Description
additionalParams Object A name-value pair object that contains parameters that are added to this URL request only. These additional parameters are not saved to the GlideURL object.
Table 4. Returns
Type Description
String The GlideURL with the specified additional parameters added to the end.

GlideURLV3 - GlideURL(String contextPath)

Creates an instance of the GlideURL class.

Table 5. Parameters
Name Type Description
contextPath String A relative path for the URL.

GlideURLV3 - refresh()

Reloads the current page URL.

This refreshes the current page URL, not the URL set in the object.

Table 6. Parameters
Name Type Description
None
Table 7. Returns
Type Description
void