ersureshbe
Giga Sage

Use Case:

I wish to create a PDF or Word document derived from the ticket. Upon clicking the 'Generate Certificate' button, the document should be produced and attached to the corresponding ticket.

 

Solution:

The subsequent steps implement a methodical approach to attain the specified state.

 

Step-1: The subsequent plugin must be installed. It is available for free subscription and can be downloaded from the ServiceNow store.

https://store.servicenow.com/store/app/aee82b2e1be06a50a85b16db234bcb06

 

Step-2: After the plugin has been installed, verify its presence on the homepage by utilizing the left navigation pane.

 

ersureshbe_0-1778699948515.png

 

Step-3: After completing step 2, the screen displayed below will appear, allowing you to select the required template. In this instance, I have chosen the HTML template.

ersureshbe_1-1778700329683.png

 

Step-4: Complete the necessary field and primarily develop the template within the 'Body' field and assemble it. Primarily, the ticket fields will be incorporated into the template. It is also adjustable; when you choose the table, the required field will be populated, allowing you to select the necessary field and associate it with the appropriate location in the template. Refer below yellow highlighted

 

ersureshbe_4-1778701466765.png

 

Step-5: Develop UI Action called 'Generate Report' and Map it to the appropriate table. Copy 'sys_id' from 'sn_doc_html_template' table which you configured.

 

ersureshbe_2-1778701205307.png

 

Step-6: Open already submitted ticket and Click the 'Gen Report'. You can see the report is attached in the same ticket.

ersureshbe_5-1778702088360.png

Summary:
1. Acquire the Document Template from the ServiceNow Store.
2. Set up the template in the 'sn_doc_html_template.do?' table.
3. Create a UI Action and integrate the template ID into the UI Action.

 

Regards,

Suresh.