I would like to fill the stored attribute 'InvoiceAmountOut', which is part of the Customer entity, with the total overdue invoice amount. Hence, I created below microflow, which correctly calculates the 'InvoiceAmountOut' for the first customer of the list. However, my goal is to calculate this amount for all customers in the list. It makes sense that the microflow currently does not give the correct outcome, as the invoice retrieve activity is done over association and therefore only retrieves invoices of the first customer. Unfortunately, I cannot find a way to get all invoices and correctly assign the overdue amounts to the customers. Could you advise me how to achieve this?
Arjan van den Top
The mistake you make is that you should commit the value IN the iteration of the customer. You now change it after the iteration. My assumption is that the list you are getting is the list with all the customers.
Hope this helps.
I think you would have to add the activity retrieve List of Invoice by Customer association inside your Customer Iteration Loop. This will retrieve the Invoices of all the customers. Keeping it outside retrieves the Invoice of only One Customer object that's being passed as input parameter. Make sense?
Thank you so much Ronald. It works now. Such a powerful tool!