Export PDF list with related list

Prateek kumar
Mega Sage

Hello Experts

I am trying to export a list a list of records as PDF but wanted to include the related list for these records as well. I followed Marks' article but for some reason it is not allowing me to save the record as it shows a syntax error. 

Could any one help me or guide me where i'm going wrong.

Any help is greatly appreciated.

https://www.servicenowguru.com/system-ui/enabling-related-list-exports-servicenow/

find_real_file.png

XML UI Action:

find_real_file.png


Please mark my response as correct and helpful if it helped solved your question.
-Thanks
1 ACCEPTED SOLUTION

sachin_namjoshi
Kilo Patron
Kilo Patron

This is already available OOB with glide.export.pdf.list.related_list system property.

You will be able to export PDF with related list using this system property.

 

Regards,

Sachin

View solution in original post

13 REPLIES 13

Mark Stanger
Giga Sage

Looks like the syntax highlighter tried to escape some of the characters there in the SNGuru article.  I can't update the code there anymore, but you can easily update your code to make this work.  Just replace the following.

In your first screenshot, replace '>' with the 'greater than symbol ---- '>'

In your second screenshot, replace '&lt;' with the 'less than' symbol ---- '<' and replace '&gt;' with the 'greater than' symbol ---- '>'.

Note that the code from your second screenshot does an XML export.  If you want to do a PDF export simply replace each instance of 'unload_xml' with 'unload_pdf' (for portrait view) or 'unload_pdflandscape' (for landscape view).

Just checking on on this one.  Has this question been answered or is there more information I can help you with?  If it's been answered, please mark the answer above as the correct one so people know this has been taken care of.  Thanks!

Mark i tried your approach but didn't help. I created a system property as suggested by Sachin and it helped. Thanks for your time.


Please mark my response as correct and helpful if it helped solved your question.
-Thanks

YASHIK
Kilo Expert

Its 2022 on a San Diego version and i am still struggling to Print out what's on my screen (DASHBOARD) as a pdf and it's not easy using my PDI. I am shocked. When i do my export to PDF, i only get a blank page. Printing to PDF / Excel / Word must be a standard feature OOTB.