diff --git a/Core ServiceNow APIs/GlideNavigation/Redirect user to a new URL/README.md b/Core ServiceNow APIs/GlideNavigation/Redirect user to a new URL/README.md new file mode 100644 index 0000000000..dbfc141318 --- /dev/null +++ b/Core ServiceNow APIs/GlideNavigation/Redirect user to a new URL/README.md @@ -0,0 +1,10 @@ +# g_navigation.open(url, target) +This method redirects users to a new URL. You can specify the frame where the content should load (e.g., the current frame or a specific one). + +### Example: Open All Active Incidents of the Caller + + var callerID = g_form.getValue("caller_id"); + var url = "incident_list.do?sysparm_query=active=true^caller_id=" + callerID; + g_navigation.open(url, "_blank"); + +This code opens a list of all active incidents for a specific caller in the current frame. It’s perfect for quickly accessing incidents tied to a particular user without leaving your current workflow. diff --git a/Core ServiceNow APIs/GlideNavigation/Redirect user to a new URL/open.js b/Core ServiceNow APIs/GlideNavigation/Redirect user to a new URL/open.js new file mode 100644 index 0000000000..68d80473db --- /dev/null +++ b/Core ServiceNow APIs/GlideNavigation/Redirect user to a new URL/open.js @@ -0,0 +1,3 @@ +var callerID = g_form.getValue("caller_id"); +var url = "incident_list.do?sysparm_query=active=true^caller_id=" + callerID; +g_navigation.open(url, "_blank");