- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-18-2021 01:07 AM
Hi, it is super easy to export a record as a pdf.
Right click on the header, export, pdf.
Is it possible to script that?
Can i use the ui action export?
My target is, to export the user record for a npa control.
So the user request a PDF over the SC, select the User an then the pdf is attached to the RITM or it is send by a Notification.
I need a scripted solution. It is not possible to do it manual or give read access to the regarding Records.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-18-2021 01:28 AM
yes you can generate the PDF using client side UI action
check if this helps you; it would show UI action for user to download the PDF of the record
UI action steps
Client - checkbox True
OnClick - generatePDF()
Form Button - True
Form context menu - True
Script:
function generatePDF(){
var url = '/' + g_form.getTableName() + '.do?sys_id=' + g_form.getUniqueValue() + '&PDF';
window.open(url,"_blank");
}
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-06-2022 02:31 AM
Hi Ankur,
I implemented same for Problem form but it's not working.UI Action isn't clickable.
Please help me on the same.
Thanks,
Ankita
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-06-2022 09:51 PM
Hi Ankita, can you be more specifc?
Can you send as your Script?
And a Screenshot auf that UI ACTION?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-30-2022 05:50 AM
thanks in advance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-30-2022 06:41 AM
Hi,
you can use PDF Generation API and create custom pdf.
regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-19-2022 03:42 AM
Hi Ankur
Is there a way i can export to PDF from portal? problem now is if i use the pdf generating utility its exporting similar to that of Form. but i want a PDF if i do Print from browser? is there any way it would be helpful