Hi,
I have 2 CDS entities related with many-to-many relationship. I want to relate 2 records from both entities together but unfortunately Microsoft Flow can't do it. Using PowerApps is not an option (need to do it in a loop). How can I achieve it?
Regards,
Mike
Solved! Go to Solution.
When a many to many relationship is created in the CDS, I believe this is actually creating a link entity with two 1 to many relationships. This link entity is then hidden and you have no way to access or modify it. In order to get more control over the relationship and achieve your requirement, I think you will need to create the link entity manually.
For example if you have Entity A and Entity B that need to be linked using a many to many. Create a new entity (Entity C) and add lookup fields to both Entity A and Entity B. This will create a 1 to many from your link entity to both A and B, and therefore creating a many to many between A and B.
Then, when you want to create the relationship within Flow. You simply create a new record (Entity C) and set the lookup values for Entity A and Entity B.
Hope that all makes sense.
Proud to be a Flownaut!
Follow me on Twitter at @QG_LeeJHarris
Or on LinkedIn at in/leejharris
When a many to many relationship is created in the CDS, I believe this is actually creating a link entity with two 1 to many relationships. This link entity is then hidden and you have no way to access or modify it. In order to get more control over the relationship and achieve your requirement, I think you will need to create the link entity manually.
For example if you have Entity A and Entity B that need to be linked using a many to many. Create a new entity (Entity C) and add lookup fields to both Entity A and Entity B. This will create a 1 to many from your link entity to both A and B, and therefore creating a many to many between A and B.
Then, when you want to create the relationship within Flow. You simply create a new record (Entity C) and set the lookup values for Entity A and Entity B.
Hope that all makes sense.
Proud to be a Flownaut!
Follow me on Twitter at @QG_LeeJHarris
Or on LinkedIn at in/leejharris
Thanks @LeeHarris . This is how I've workarounded this relationship so far but TBH I think it's a temporary solution. Especially that CDS allow for creating N:N relationship so the lack of functional support seems to be a bug to me.
This article is a way better solution instead of creating the record in the NN table.
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!
User | Count |
---|---|
14 | |
14 | |
7 | |
6 | |
5 |
User | Count |
---|---|
24 | |
17 | |
10 | |
8 | |
6 |