UI Action to Generate PDF and Attach to Record
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-19-2023 10:22 AM
I have a custom table and various UI actions created that call various UI pages and generate form letters populated with info from the record. Today our staff are having to click the UI action, click print, print to PDF and then re-attach. Ive tried doing some research and not quite understanding PDF generation OOB with ServiceNow. Is there an easier way to tie in all these steps into one ui action that generates the PDF and attaches it to the record?
Any advice is greatly appreciated!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-19-2023 06:42 PM
HI @Nic Omaha ,
You can download "sn_doc" plugin from serviceNow store, it is a Good solution to generate a PDF and the genrated pdf will be downloaded as a comment in the notes, so you can download whnever you want.
Use below script and modify according to your requirement, You canm even set the record number as PDF name by using this script.
First you need to create an HTML document then create a UI action and link that HTML Document here with the above Script and modify the script and the name of the generated PDF as well.
Once all the steps completed, whenever you click on the UI action it will generate a pdf and it will be available as comment in the notes, if you click on the PDF in the comment it will be downloaded to you local storage.
Please refer to the below link to learn more about this sn_doc plugin:
https://docs.servicenow.com/bundle/sandiego-employee-service-management/page/product/human-resources...
If my response helps in assisting your query please mark my answer as accepted solution or helpful @Nic Omaha .
Thanks & Regards,
S. Lakshmikanth Gupta.