- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
on 02-02-2021 10:15 PM
A question arose in the community as to whether it would be possible to open a printer friendly version of the record view from within the Workspace.
Basically OOTB there is no option but you can create a simple UI Action to provide your agents with such a view.
In order not to reinvent the wheel, the built-in but somewhat hidden print version is used. To find that option, click on the wheel in the upper right corner of the classic interface and change to tab "General" click on printer icon:
After clicking on printer icon a window is opened and the current URL is loaded with an additional URL parameter "sysparm_media=print" at the end.
This parameter ensures that the page is rendered with minimal and printer friendly contents.
Back to Workspace. The detail view of a record is rendered there with the help of the view "Workspace". With this knowledge, a URL can now be assembled that loads the current record in the printer friendly version from the "Workspace" view.
The complete UI Action should be configured as follows:
Name | Print Version |
Table | Global |
Active | true |
Show update | true |
Client | true |
Workspace Form Menu | true |
Workspace Client Script |
|
As a result you will find the new menu item at any record view:
- 4,598 Views
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hi Maik,
This is really helpful, thank you.
I was wondering if there's a way to limit / choose what can be printed.
Currently, the ribbon and header details are not included.
However other items are included such as HR Tasks, Emergency contacts, Cases opened for user, similar cases,Interactions, Articles read, etc.
These would be irrelevant for printing in most cases, blank in many cases, and I'd either like for it to be excluded or the person printing to be able to choose.
Any advice on this would be great.
Thanks
Catherine
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hi
unfortunately there is no control over the rendered contents as just an OOTB feature is leveraged.
Kind regards
Maik
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
On this UI Action, I would also like to add a UI Action button to the RITM form so that a print friendly version can be opened. So far I have not been able to achieve this.
Love your script for workspace and it worked perfect!
Melissa
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Nevermind .. got it!
Client = Checked
Form button = Checked
Onclick = printView()
Script:
function printView() {
var sysparm_table = g_form.getTableName();
var sysparm_sys_id = g_form.getUniqueValue().toString();
var a='https://<Your Instance>.service-now.com/';
var view = 'Print_default_view'; //Optional if you have a specific view you want
g_navigation.openPopup(a + sysparm_table + '.do?sys_id=' + sysparm_sys_id + '&sysparm_record_rows=1&sysparm_view=' + view + '&sysparm_record_target=' + sysparm_table + '&sysparm_record_list=ORDERBYnumber&sysparm_record_row=1&sysparm_stack=no&sysparm_force_row_count=999999999&sysparm_media=print');
}