Generate a Document In Flow for a Case
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Is it possible to generate a document (like a letter of employment) after a case has been submitted?
Essentially, after the user provides details in the record producer - can that information be passed into a Letter of Employment document template and then available for the user to download from the Employee Center portal?
Is a flow needed for building something like this? Or is there a better way?
- Labels:
-
Employee Document Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
if you have already configured document template then you can use server side script to generate the document and attach to record
check my blog
Generating and Attaching Document Templates in ServiceNow to Record - Server Side
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Hi @Justin21
1. You can achieve it by running fix script/background script
var recordId = current.sys_id; // Sys ID of the submitted Case record var documentTemplateId = 'YOUR_TEMPLATE_SYS_ID';
var pdfName = 'Letter_of_Employment.pdf';
new sn_doc.GenerateDocumentAPI().generateDocumentForTask(recordId, documentTemplateId, pdfName);
