Document generation based on HR Case approval

Mayank Das
Tera Contributor

Hello all

 

I have created a HR Service, an associated record producer and a document template. I have attached the document template in the HR Service's template so that a PDF is generated every time anyone submits a request on the esc portal. The PDF is then automatically added in the 'Generated Document' field on the HR Case and is visible to the requester in the HR case's hrm_ticket_page.

 

Instead of the document getting generated automatically, I want the HR case to be submitted for an approval to a HR group. Once the group member approves the HR Case, only then the PDF should be generated.

I have achieved the approval part through flow designer but the automated document generation part is not working as expected. I had to remove 'Automatically Create Draft Document' from the Case options of HR Service to delay the document generation. But now I am a bit confused about the document generation part.

Any help or suggestions please?

Thanks in advance!

2 REPLIES 2

Ankur Bawiskar
Tera Patron
Tera Patron

@Mayank Das 

If you remove that case option then it won't attach the file

Somehow you should be able to know how ServiceNow uses that case option to add file

If you know that you can move the trigger after your custom approval

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Apurva16
ServiceNow Employee
ServiceNow Employee

@Mayank Das

You can use flow designer to check the status of the case, once the approval task has been competed and the case status has changed, you can use the action "Generate PDF Document" to then generate the document on the case.

 

Hope this helps.