Modify Output Of PDF Report
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2024 09:54 PM
Hi all
I am looking for a way to remove the data on the PDF report export when I select export PDF. I did like to remove some specific information on the report. For example, if I am on the incident form and I open the form and select the hamburger icon > export > pdf
When I open the report, I did like the fields highlighted in red removed .
Please note the existing functionality should remain in place, I did like to create a new button name "Incident Print" to carry out this new function on the incident form
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2024 11:36 PM
check these 2 links and see if that works; if not then use below approach I shared. You cannot possibly remove the Run by but you can remove the red fields
Remove extra details from the PDF report export
How to modify or remove the table details on the exported PDF
For that you create a new view similar to above and remove those 2 red fields and in your button have this script and mention the view name
1) UI action to be client side something similar to this and script as this
function printPDF(){
var uri = g_form.getTableName() + '.do?sys_id=' + g_form.getUniqueValue() + '&sysparm_view=yourViewName&PDF';
g_navigation.open(uri);
}
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2024 10:37 AM
hello
I only want this button to appear on my new view and not the incident view, is the above script going to work for that