Object of type Customer.Order cannot be updated, as it does not exist anymore

0
Hello, I have a microflow which retrieves a list of 'Order' objects belonging to a customer and then passes the list of 'Order' objects to a sub microflow which deletes and updates 'Order' objects based on business logic. I am getting the below error when trying to commit the 'Order' list in the parent microlfow after the sub microflow has executed. "Object of type 'Customer.Order' cannot be updated, as it does not exist anymore" I understand that error is occurring due to commit on the list which contains the deleted object but I was expecting this to be handled by Mendix as this would be a common scenario. Thanks  
asked
1 answers
1

Try removing the order you are about to delete from the order list before or after you delete it.

You can do this with the change list activity. Set it to change the list you pass to the sub microflow and set it to remove the object you are iterating. 

 

I'm not sure if you should remove the object before or after you delete it. Or if that really matters. I would test both ways. 

 

 

answered