Scoped GlideSession - getUrlOnStack()

Returns the URL on the stack. Returns null if the stack is empty.

Table 1. Parameters
Name Type Description
None
Table 2. Returns
Type Description
String The URL. Returns null if the stack is empty.

var session = gs.getSession();
var URL = session.getUrlOnStack();
gs.info(URL);

Output: line breaks added for clarity.

sys_app.do?sys_id=ce05b9f32b840200c5244f74b4da1501&sysparm_goto_url=sys_app.do
%3Fsys_id%3Dce05b9f32b840200c5244f74b4da1501