cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Query Dynamics 365 CE data with filter using n:n relationship

In Dynamics 365 CE there is a possibility in Advanced Find to query for records that have (or don't have) related records in a n:n relationship.

 

For example: I can show all User records that have Security Roles associated to it.

 

Now I want to create a Flow that updates all of the found User records.

 

How can this be archived?

 

Does Flow provide the possibility to use a similar filter?

2 REPLIES 2
Highlighted
Community Support
Community Support

Re: Query Dynamics 365 CE data with filter using n:n relationship

Hi @mgr,

 

Could you please explain more details about the n:n relationship that you mentioned?

Or could you please share a details example about your requirements?

 

Please share more details so we would try to provide a proper workaround for you.

 

Best regards,

Alice

Highlighted
Frequent Visitor

Re: Query Dynamics 365 CE data with filter using n:n relationship

I wanted to find out which of the Users within CRM (MsDyn365CE) do have at least one Security Role assigned.

 

Technically spoken the relationship between a System User and a Security Role ist set up by a hidden intersect entity called "Systemuserroles": 

https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/entities/systemuserroles

 

I found out now that you are able to query it with Flow by using the EntitySetName "systemuserrolescollection".


So this is wonderful! I created a Flow now which sets a flag on the User record as soon as he has a Security Role associated. I think I even could post all of the Security Role Names into a comma separated string into a  field of the User record.

Helpful resources

Announcements
firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

Join the new Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

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

Top Solution Authors
Top Kudoed Authors
Users online (7,508)