The CreatorCon Call for Content is officially open! Get started here.

Export to PDF on service catalog form

Community Alums
Not applicable

We have a unique service request where a user does not submit the service request form but exports the form to a pdf.

I created 'Export to PDF' button in a UI page and calling it in my form variable. When user clicks 'Export to PDF' button, I want the script to carry all the form fields entered by the user to get   displayed in a pdf file with two column format ('field label' & 'field value').

If anyone has done this before, pls share your script or please provide me steps to do this myself.

This is the screenshot of my form.

Export to PDF.GIF

6 REPLIES 6

prathap kumar 1
Tera Contributor

Hi Rajinis,

have you implemented the above functionality?? i have similar requirement can u guide me with the step to implement the same.

benjamin_alldri
Mega Expert

Your best bet would be to do it through PDF forms. The actual building of the PDF to use as a template for it is much more complex than the integration on the ServiceNow side of things, but there's quite a few tools out there to do it now.

 

https://community.servicenow.com/community?id=community_blog&sys_id=4acc6265dbd0dbc01dcaf3231f961949 is a great write-up of how to implement this functionality.

Community Alums
Not applicable

My requirement was to create a PDF of the service catalog item form before the form is even submitted for request. Is that possible?

Yes, you should be able to accomplish it with the method I posted earlier. Instead of using GlideRecord to look up the record from the database, use the actual values populated on the form instead (using g_form.getValue() or something similar).