Very likely order-orderline has a 1-* association. In your order line's ‘On commit’ microflow, you can use the activity ‘Retrieve’ over this association, passing Orderline as a parameter and receiving one order object.
Next, do a Retrieve of orderlines passing the order object.
Next, do an Aggregate List → Count, and you have your number of orderlines of the order to which your orderline belongs.
Hi Tim,
Is the first Retrieve ‘by association’ ? Order stays empty after the first Retrieve action. So the count is always 0.
Ok, it makes more sense now. I use the microflow as an event handler when adding an orderline. See screenshot. How do i get the order object here?