web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

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

(0) ShareShare
ReportReport
Posted on by 35

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?

I have the same question (0)
  • v-yuazh-msft Profile Picture
    on at
    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

  • moko33 Profile Picture
    35 on at
    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.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 614 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 401 Moderator

#3
chiaraalina Profile Picture

chiaraalina 282

Last 30 days Overall leaderboard