How to export Requested Item to PDF (including Variable Editor) without preview or print view?

lidorz
Tera Contributor

 

Hi all,

I've already created a UI Action button that opens the Requested Item form in print view using this URL:

/sc_req_item.do?sys_id=xxx&sysparm_media=print
lidorz_0-1753082081518.png

 

 

This works well and shows the Variable Editor, but it requires the user to manually click "Print" and then save as PDF.

My requirement is to automatically export the RITM to PDF, including all catalog variables (from the Variable Editor) — but without showing a preview or relying on the browser print dialog.

 

Is there a way to:

  • Export the full Requested Item to PDF,

  • Include the Variable Editor,

  • Without requiring user interaction (print/save)?

Any workaround or best practice would be appreciated.

Thanks!

lidorz_1-1753082125369.png

 

4 REPLIES 4

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @lidorz 

 

did you try OOTB export

 

DrAtulGLNG_0-1753082452064.png

 

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

lidorz
Tera Contributor

yes i tried...
but this OOB export dont include the variable editor

Hi @lidorz 

 

Then no idea mate.

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Ankur Bawiskar
Tera Patron
Tera Patron

@lidorz

you can use PDF Generation API

check this link which has script from Piyush

Generate PDF file for catalog variables and attach it to RITM 

you can check the PDF Generation API for this

Generating Custom PDFs - using the new PDFGenerationAPI

another method

Generate PDF and attach to the record

When catalog item is submitted, attach variables to RITM as a PDF 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader