tiagomacul
Giga Sage

 

 

Redirect Incident

var url = '/incident_list.do?sysparm_query=active=true%5Enumber%3DINC0000552';
gs.setRedirect(url);

 

Custom table

var url = '/u_your_table_list.do?sysparm_query=u_your_field%3DYourValue';
gs.setRedirect(url);

 

External URL

var url = 'https://www.globo.com';
gs.setRedirect(url);

 

 

setRedirect(Object URI)

Sets the redirect URI for this transaction, which then determines the next page the user will see.

Parameter(s):
NameTypeDescription
URIObjectURI to set as the redirect
Return:
TypeDescription
voidMethod does not return a value
Scoped equivalent:

To use the setRedirect() method in a scoped application, use the corresponding scoped method: setRedirect().

Example

This example redirects the user to a particular catalog item, and passes along the current email as a parameter.

 

gs.setRedirect("com.glideapp.servicecatalog_cat_item_view.do?sysparm_id=d41ce5bac611227a0167f4bf8109bf70&sysparm_user=" 
+ current.sys_id + "&sysparm_email=" + current.email)

 

 

Author:

Tiago Macul

Danilo Miyashita

Know-More-Now-Logo.jpg

Oficial Doc

gs.setRedirect() in combination with current.setAbortAction(true) not executed

Client & Server Code in One UI Action

SETREDIRECTURL AND SETRETURNURL

 Redirect after session timeout

 

Was useful, please leave your feedback!

 

Version history
Last update:
‎12-20-2018 10:23 AM
Updated by: