cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
muzhasan
Level: Powered On

Lookup related Many to Many (N:N) records using Flow

In my data model I have established a many to many (N:N) relationship between two Entities. When I Get a CDS Record in Flow, how can I lookup any of these Related records?


I have tried Getting Records using the N:N Reationship Entity Name as the Entity, but this isnt recognised as a valid source.


So as a work around I tried to use a Mutli-select Option Set. Again in Flow I was unable to see any of these multi select values on my Record.


Can anyone provide any guidance on how I can work with N:N relationships or Multi-select option sets in Flow? I am loathed to create Custom Entity just to hold the relationships...

1 ACCEPTED SOLUTION

Accepted Solutions
muzhasan
Level: Powered On

Re: Lookup related Many to Many (N:N) records using Flow

I just found an article which states how to access the related table.

 

https://www.sikich.com/insight/how-to-find-n-n-relationships-with-dynamics-365-logic-apps-and-flow/

 

Essentially you have suffix the relationship entity name with the word 'set' and then its can be found using the List records action. 

 

Just testing it now...

View solution in original post

5 REPLIES 5
Dual Super User
Dual Super User

Re: Lookup related Many to Many (N:N) records using Flow

Hi @muzhasan 

 

To get the related records for a particular record of the entity, you can loop through and get those records. Please see the solution in the below thread and check if that works for you:

https://powerusers.microsoft.com/t5/Building-Flows/Sales-Rep-from-Dynamics-to-HTML-Table/m-p/291418#...

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

muzhasan
Level: Powered On

Re: Lookup related Many to Many (N:N) records using Flow

Thank yo for your response.

 

Unfortunately I am unable to use any Dynamics 365 actions due to a corporate policy in place. I can only access records using the CDS actions or Web Services.

 

Is there still a way for me to acheive this?

Highlighted
Dual Super User
Dual Super User

Re: Lookup related Many to Many (N:N) records using Flow

Hi @muzhasan 

 

Yes. You could do that with the CDS actions too. Please give it a try and let us know if you face any issues. 

muzhasan
Level: Powered On

Re: Lookup related Many to Many (N:N) records using Flow

It is not clear to me from this article how I need to approach this.

 

My problem is that when I Get a record from entity A, there are no dynamic fields available to the related entity B.

 

Maybe if we approach this the other way: How can I add a new N:N realtionship between two CDS entities using flow ? If this can be answered then it might explain now these relationships work.

muzhasan
Level: Powered On

Re: Lookup related Many to Many (N:N) records using Flow

I just found an article which states how to access the related table.

 

https://www.sikich.com/insight/how-to-find-n-n-relationships-with-dynamics-365-logic-apps-and-flow/

 

Essentially you have suffix the relationship entity name with the word 'set' and then its can be found using the List records action. 

 

Just testing it now...

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 476 members 6,599 guests
Please welcome our newest community members: