From fd7efadd12af8cec73db649fba07068aee4b3210 Mon Sep 17 00:00:00 2001 From: DavidMarcial <60865187+DavidMarcial@users.noreply.github.com> Date: Thu, 30 Oct 2025 14:54:40 +0100 Subject: [PATCH 1/2] Create printer_friendly_verison.js --- .../printer_friendly_verison.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 Client-Side Components/UI Actions/Printer Friendly Version/printer_friendly_verison.js diff --git a/Client-Side Components/UI Actions/Printer Friendly Version/printer_friendly_verison.js b/Client-Side Components/UI Actions/Printer Friendly Version/printer_friendly_verison.js new file mode 100644 index 0000000000..f1049cb24f --- /dev/null +++ b/Client-Side Components/UI Actions/Printer Friendly Version/printer_friendly_verison.js @@ -0,0 +1,15 @@ +printView() + +function printView() { + + var table = g_form.getTableName(); + var recordID = g_form.getUniqueValue(); + var view = {{Insert the view you want to print here}}; //You can pass in an empty string and it will still work + var windowName = {{Insert the name you want your window to display}}; //You can pass in an empty string and it will still work + var features = 'resizeable,scrollbar'; //You can pass in an empty string and it will still work + var urlString = '/' + table + ".do?sys_id=" + recordID + "&sysparm_view=" + view + "&sysparm_media=print"; + var noStack = true; //Flag that indicates whether to append sysparm_stack=no to the URL + + g_navigation.openPopup(urlString, windowName, features, noStack); + +} From e4f87d4863a0d5185decafab0d2eea074b831442 Mon Sep 17 00:00:00 2001 From: DavidMarcial <60865187+DavidMarcial@users.noreply.github.com> Date: Thu, 30 Oct 2025 15:11:11 +0100 Subject: [PATCH 2/2] Create README.md --- .../UI Actions/Printer Friendly Version/README.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 Client-Side Components/UI Actions/Printer Friendly Version/README.md diff --git a/Client-Side Components/UI Actions/Printer Friendly Version/README.md b/Client-Side Components/UI Actions/Printer Friendly Version/README.md new file mode 100644 index 0000000000..b59ad213f4 --- /dev/null +++ b/Client-Side Components/UI Actions/Printer Friendly Version/README.md @@ -0,0 +1,5 @@ +## Overview + + +This code snippet UI Action will allow you to have a printer friendly version of whatever record you might are trying to print. +This UI action uses the GlideNavigation API which you can find here [GlideNavigation API](https://developer.servicenow.com/dev.do#!/reference/api/zurich/client/c_GlideNavigationV3API#r_GNV3-openPopup_S_S_S_B)