Microflow, creating a new record not making the association between entities
Hi, I hope you can help me. I’m retaking the development work after years as PM. My last year as a programmer was 2003, so a hiatus of almost 20 years. I have some catch-up to do. I am working with Medix Studio Pro 9.17.0, and have a straightforward model, with 3 entities (Orders← ProductsInOrders→ Products): For particular functionalities of my client’s use case, I need to create a microflow that gets the record of a specific Order and a specific Product to update the attribute Quantity (stored in the ProductsInOrders entity). Also, if no record is found, then the microflow must create the record and assign the given Quantity. Here is my draft microflow: My issue is that the record is created but it does not seem to be connected to the Products entity. As you can see in the next screenshot, it shows the Order related to the record (green box), but not the product (red box). Any idea of what I may be doing wrong? I’m sure is some newbie mistake in the way associations work but I can put my finger on it. Thanks in advance for any help.
Cant tell exactly from your screenshots but on creating the object you must set an association to the Order entity and an association to the product entity. Seems in this case that the association to the product is not set!
Hope this helps
Maarten’s suggestion made me think and I found a solution.
First, I added a retrieve action to the workflow to get the desired product.
Then I added a new change item for the association to the Create Action: