Skip to content

Commit fd7efad

Browse files
authored
Create printer_friendly_verison.js
1 parent 5b867bf commit fd7efad

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
printView()
2+
3+
function printView() {
4+
5+
var table = g_form.getTableName();
6+
var recordID = g_form.getUniqueValue();
7+
var view = {{Insert the view you want to print here}}; //You can pass in an empty string and it will still work
8+
var windowName = {{Insert the name you want your window to display}}; //You can pass in an empty string and it will still work
9+
var features = 'resizeable,scrollbar'; //You can pass in an empty string and it will still work
10+
var urlString = '/' + table + ".do?sys_id=" + recordID + "&sysparm_view=" + view + "&sysparm_media=print";
11+
var noStack = true; //Flag that indicates whether to append sysparm_stack=no to the URL
12+
13+
g_navigation.openPopup(urlString, windowName, features, noStack);
14+
15+
}

0 commit comments

Comments
 (0)