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

How to directly download pdf generated from PDFGenerationAPI instead of putting attachment in record

sieusaopolo15
Tera Guru

Hi,

I've been using PDFGenerationAPI to generate custom PDF templates for specific tables but I want to ask if there is any way to directly download the file when user presses the button ? I still want to keep the PDFGenerationAPI used in the button but I don't want it to put the attachment inside an record, it can cause user confused

5 REPLIES 5

Sumanth16
Kilo Patron

Hi @sieusaopolo15 ,

 

 

Please refer to below thread:

https://www.servicenow.com/community/developer-articles/generating-custom-pdfs-using-the-new-pdfgene...

 

If I could help you with your Query then, please hit the Thumb Icon and mark it as Correct !!

 

Thanks & Regards,

Sumanth Meda

Hi @Sumanth16 ,

Thanks for providing the information, but I found that the article just show how to use PDFGenerationAPI properly and no mentions related to directly download the file nor how to prevent putting the attachment inside a record

Hello , have you found in solution for this one? or any workaround?

 

Thank you

 

Hi @jacque3 ,

Unfortunately can not, that is default function of PDFGenerationAPI, but I came up with the idea is that I will name the pdf file with the specific format then I create a business rules to check insert after if the files uploaded to the ticket has that specific format it will remove from table sys_attachment