From c4f8c70146af6b9ed0ebbdc32b1203f3caa921b3 Mon Sep 17 00:00:00 2001 From: Debendu Das <66923140+debendu-das@users.noreply.github.com> Date: Sun, 5 Oct 2025 01:44:31 +0530 Subject: [PATCH 1/4] Create README.md --- .../Redirect user to a new URL/README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 Core ServiceNow APIs/GlideNavigation/Redirect user to a new URL/README.md 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. From ceccf78b1ce7c91c9911580979b1814f74dd41a3 Mon Sep 17 00:00:00 2001 From: Debendu Das <66923140+debendu-das@users.noreply.github.com> Date: Sun, 5 Oct 2025 01:45:12 +0530 Subject: [PATCH 2/4] Create open.js --- .../GlideNavigation/Redirect user to a new URL/open.js | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 Core ServiceNow APIs/GlideNavigation/Redirect user to a new URL/open.js 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"); From 286befefcd6aa06467f8b9ce1010d11cb939bbe7 Mon Sep 17 00:00:00 2001 From: Debendu Das <66923140+debendu-das@users.noreply.github.com> Date: Sun, 5 Oct 2025 02:14:42 +0530 Subject: [PATCH 3/4] Create README.md --- .../Open a URL in a popup window/README.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 Core ServiceNow APIs/GlideNavigation/Open a URL in a popup window/README.md diff --git a/Core ServiceNow APIs/GlideNavigation/Open a URL in a popup window/README.md b/Core ServiceNow APIs/GlideNavigation/Open a URL in a popup window/README.md new file mode 100644 index 0000000000..4f6fa2b667 --- /dev/null +++ b/Core ServiceNow APIs/GlideNavigation/Open a URL in a popup window/README.md @@ -0,0 +1,9 @@ +# g_navigation.openPopup(url, name, features, noStack) +This method open a URL in a popup window with options to customize the popup’s behavior (e.g., resizable, scrollbars, etc.). + +### Example: Open Child Incidents in a Popup + + var parentIncidentID = g_form.getUniqueValue(); + g_navigation.openPopup('incident_list.do?sysparm_query=parent_incident=' + parentIncidentID, 'Child Incidents', 'resizable,scrollbars,status',true); + +This code opens a popup window to display all incidents that are children of a specific parent incident. It’s great for visualizing relationships between incidents without cluttering the main interface. From 7104b876815a4080058d694aecd6a1f2f526c254 Mon Sep 17 00:00:00 2001 From: Debendu Das <66923140+debendu-das@users.noreply.github.com> Date: Sun, 5 Oct 2025 02:16:07 +0530 Subject: [PATCH 4/4] Create openPopup.js --- .../GlideNavigation/Open a URL in a popup window/openPopup.js | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 Core ServiceNow APIs/GlideNavigation/Open a URL in a popup window/openPopup.js diff --git a/Core ServiceNow APIs/GlideNavigation/Open a URL in a popup window/openPopup.js b/Core ServiceNow APIs/GlideNavigation/Open a URL in a popup window/openPopup.js new file mode 100644 index 0000000000..a8f724fa49 --- /dev/null +++ b/Core ServiceNow APIs/GlideNavigation/Open a URL in a popup window/openPopup.js @@ -0,0 +1,2 @@ +var parentIncidentID = g_form.getUniqueValue(); +g_navigation.openPopup('incident_list.do?sysparm_query=parent_incident=' + parentIncidentID, 'Child Incidents', 'resizable,scrollbars,status', true);