PDF Generation with data from parent and child record (Document Template)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Hello everyone,
I have the following use case:
I want to generate a PDF from a record and attach the PDF to the record.
The PDF should contain data from the parent record and the child record.
I created an UI Action with a form button and used sn_doc.GenerateDocumentAPI() to create the PDF and attach it to the record. Works well.
I am using Document Template to create the PDF template: https://store.servicenow.com/store/app/aee82b2e1be06a50a85b16db234bcb06
In the document template editor I can add fields from the parent record but not from the child records.
Does anyone know a way how to access child records?
Thank you for your support!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
Hello @david08 ,
I didn't use this before, I dont have detail idea about document template But if there is option for server side script , then you can fetch data from your relevant child table using GlideRecord.
If my response helps you then mark it as helpful and accept as solution.
Regards,
Aditya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
Hi @david08,
You can refer to the below documentation; I used this when I had this requirement. Hope this helps you:
If you find my answer useful, please mark it as Helpful and Correct. 😊
Regards,
Soham Tipnis
ServiceNow Developer || Technical Consultant
LinkedIn: www.linkedin.com/in/sohamtipnis10
