Skip to main content

Hi All, 

I am trying to figure out how to accomplish my task. I have created a flow when starts at a custom object and has child objects.

I have basically made the screen flow to go through the main object , receive updates, have them check child objects. I am able to present the preview of the docgen package, but the package is showing all records. 

 

I starting from the parent. I want to select child records and pass those records to the docgen package. Currently I only see where you can select the 1 record 

but in the apex action you can send either the record ID or record IDS , if you include both you get an error.
 

I do have record id, contact id, records ids to feed to the doc gen package but do not know how to specify those to the package.

My goal is to produce a pdf that will be emailed to the contact id. where I can filter the table below with selected rows. Also the total amount is off… Is the only way to do this is by excel or can I use word to sum the total price column.

 

Hi @jbolanoswga ,

The “Record Ids” input parameter is not meant to filter data going into your document. The only place where data can be filtered is on the DocGen package itself. The “Record Ids” parameter is meant for a batch job in case you’d like to run the package for multiple records in order to create multiple outputs. This is why you can only use one parameter or the other.

What you need to do is have your flow mark each selected record on the child object; Ex: a boolean. Then run the docgen package after this is done. The DocGen package can then filter the child records for those with the boolean checked and exclude those without the boolean checked. You may also want the flow to loop through all of the records and uncheck the boolean after the document is generated for the next user who runs a document on the same record. 

I hope this was helpful.

 

Best,

Ray C 

 


ok I can see that being a work around for this, I like it and will take your advice. 

I had created an Invoice field, with Invoice date, Invoice number and other things but could not figure out how to pass them since they were not part of the recordid…

 

Thanks

JB


Reply