Generate a pdf

Hi Everyone,   I’m having an issue generating a pdf from a document template. I followed the instructions but I can’t get it to generate a document. Can anyone help?    Stack Trace: Domain Model: Submit Microflow:   Create Document Microflow   Download File   Overall my goal is to create the pdf and have it sent via email with the other attachments.    *The version is 9.17.1 (wasn’t available in the drop down).
1 answers

It looks like in your Create Document microflow you are creating NewGenerate_Document, then trying to retrieve over an association from this object to get TA_Communication_Plan_Details_2. I suspect this association hasn’t been set if you’ve only just created the object, so when you try to use it, it is actually empty, and is causing the error you are seeing.

I would suggest putting checks for empty objects after your retrieves to make sure you have data, and if not, fail with a suitable error.

Good luck!