Good Day. Thank you for your interest.
So the background of the flow is that when an Invoice is created directly based on a Quote and it's associated Quote Product, The Invoice and Invoice Product sub-grid auto populates based on the Products selected during the Quote. The flow is intended to Bypass the Order entity step. We have a custom 'Quote' lookup field on Invoice which also populates the Quote details and products from 'Quote Product' to 'Invoice Product' Subgrid.
Now we want to be able to parse through JSON of the previously configured steps, and send out an email with the Invoice details, and a List of the related Invoice Products.
The challenge I am running into is that the Invoice Products entity which is being queried by the Parse JSON will have varying number of records depending the number and quantity of products being invoiced. How do I dynamically retrieve the List of products associated with that particular. For example one Invoice may have Two products so that's 2 Invoice Product records, another may have Three products so that's 3 Invoice Products. I'm sure a For loop would somehow be necessary but can't seem to solve the logic.
End Goal: After a new invoice is created and it's products added to the Subgrid, email out a the invoice details (invoice number, date, total amount, etc...) And the List of Products associated for that Invoice.
Thank You again and Humble Regards,
Sunny