Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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)
Original file line number Diff line number Diff line change
@@ -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);

}
Loading