UI Action on RITM to call "Printer Friendly Version"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2023 05:55 AM
I have a need to create a "Print" button on a RITM that will call the "Printer Friendly Version" function. Can anyone assist how to accomplish this?
Really, the best answer would be to have the button generate a PDF of the output from the "Printer Friendly Version" function and download it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2023 08:38 AM
Hi @Corey11 ,
if you are planning to download as an PDF. You can create an UI Actions as below.
You can create a separate view which is more specific of what fields needs to be downloaded and you can use that view in the sysparm_view = "" (Currently i am using default view so its left as "").
script:
function onClick() {
var url = '/' + g_form.getTableName() + '.do?sys_id=' + g_form.getUniqueValue() + '&sysparm_view=' + '' + '&PDF';
top.window.open(url, '_blank');
}
hope this helps.
Mark helpful and accept the solution if it helps in solving your query.
Regards,
Johns
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2023 10:44 AM
Johns, thanks for the quick response. This is not quite what I need though. This is essentially the same as the "Export to PDF" function. The "Printer Friendly Version" is what I need to utilize as it retains the HTML formatting and Look and Feel of the form I want to print.