Can i connect a list of objects to an entity, so it shows what the entity contains?

0
I am creating an app for ordering food via phone in a restaurant, and I have a problem. I have an entity of OrderItem which has a title and price, and Order entity with attributes: autoNumber and totalPrice.    When I add an OrderItem to the order, it shows on a page where the list view is set to OrderItems. Once I'm done with the Order, I press a button to call the microflow below. It creates the order with a calculated price, but I need to associate somehow what is the order made of - which OrderItems. I uploaded a domain model too.   Does anyone have any idea how I might do it? Or any other possibility.   Thanks for your help! Lukas   /file?guid=19703248379360010
asked
2 answers
0

Hi Lukas, you can create the 'Order' object before the loop and inside your loop, change the IteratorOrderItemList_2 to have the association with the 'Order' object that you just created. Also what's the purpose of deleting the 'OrderItemList'? From what I understand that would delete all of your OrderItem that was retrieved

answered
0

Hi Lukáš Morvay,

 

At the button calling microflow, you can pass the list of OrderItems to the microflow.

 

After Creating the Order, Loop the OrderItems list and use Change Object activity to assign the OrderItems to the Order Object(as It is  * - * association, It will accept the list of objects to be the association).

 

Hope it helps.

answered