Hi Renzo,
Your approach is valid. The main thing to check is that you're changing the correct side of the association and that you're working with the actual persistent objects rather than only the temporary import objects.
For example, if your association is:
Parent 1 --- * Child
and your temporary entity contains:
ParentID | ChildID
the microflow could be:
Import Excel/CSV
↓
Temporary Association List
↓
Create empty Child List
↓
Loop through imported rows
↓
Retrieve Parent using ParentID
↓
Retrieve Child using ChildID
↓
Change Child
Parent_Association = Parent
↓
Add Child to Child List
↓
End Loop
↓
Commit Child List
For a 1- association*, the reference is normally maintained on the many-side, so in this example I would change the Child object and set its Parent association.
Also, I would not commit each object inside the loop. For better performance and to avoid unnecessary database transactions, collect the changed objects in a list and commit the list once after the loop.
So instead of:
Loop → Change Object → Commit Object
use:
Create List
↓
Loop
→ Change Object
→ Add to List
↓
Commit List
If the association still isn't being created, I would check the association direction, whether the retrieved Parent/Child objects are actually found, and whether you're changing the persistent Child object rather than the temporary import object.
If you share the domain model showing the association and a screenshot of your Change Object activity, it should be possible to identify exactly where the issue is.
Kindly mark this as the accepted answer if it helps.