Is it possible to create pdf from code and attach it to a record?

andresgt
Mega Expert

What I'm looking for is if it's possible to create a PDF of one record when its closed and attach that pdf to another record.

Similar to Right Click on Header -> Export/PDF

Anyone knows if it's possible?

1 ACCEPTED SOLUTION

https://servicenowmantra.wordpress.com/2017/07/06/love-pdf-pdf-loves-you-too-pdf-generator/

This is the best i have seen so far!

You can change the rest message a little and get what you want.

View solution in original post

6 REPLIES 6

You need to create a PDF when the record is closed, write a before update business rule on that table with condition as 

Active-->Change to-->false

 

and put the rest message in the script

Janaki6
Kilo Contributor

It is working fine when we generate same form as PDF.

 

We need to attach Test case form PDF to Change form. I have added test case PDF to Change form whereas field values are empty in the PDF.