Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Unanswered

Dynamics Views: using "OR"... Error "related entity conditions or groups cannot be grouped with the parent entity conditions or groups"

(0) ShareShare
ReportReport
Posted on by 10

Hi. I hope someone can help with this baffling problem. I would have thought this would be a common problem.

I have created a "Business Process Flow" (BPF) on entity "Lead". On creating this BPF, Dynamics creates a nice BPF entity.

I want to query this BPF entity , to find records where its related "Lead" is "Disqualified", OR its related "Opportunity" is "Lost".

So I'm looking for all records of the BPF where the Lead/Opportunity didn't make it all the way thru to "Finished" because the "Lead" was "Disqualified", or because the "Opportunity" was "Lost".

[ie I'm looking for all the ones that failed to make it thru the Process because they were disqualified or lost]. 

Should be easy, shouldn't it?!

If I try and set up the View, I get an error message "To group conditions, select two or more conditions or groups that are listed under the same entity, and then click Group And or Group Or. Individual conditions that are already grouped cannot be included in new groups, and related entity conditions or groups cannot be grouped with the parent entity conditions or groups."

pastedimage1637575285575v2.png

So clearly I need to use "FetchXML Builder" to do this.

Question is this:
How can I make this "AND" statement into an "OR"?
I want records for which the

[(Lead.statecode contains data AND Lead.statecode = 2) OR (Opportunity.statecode contains data AND Opportunity.statecode = 2)]

For love nor money I cannot get this FetchXML to do an "OR"!

I've tried everything. Is it even possible to do?

I think what makes it difficult is that Lead/Opportunity are related entities.

Any help would be hugely appreciated.

  • RE: Dynamics Views: using "OR"... Error "related entity conditions or groups cannot be grouped with the parent entity conditions or groups"

    Hi MikeBradley,

    It is not possible to use GROUP OR in the UI of the CRM, but you can use “Alias” + FetchXML editing using XrmToolBox to achieve it.

    You can refer following links for more details:

    FetchXML Trick – Cross Entity Criteria in a Group Filter | Work and Study book - Dynamics 365(CE) & Power Platform Blog (wordpress.com)

    Conditional groups across different linked entities in FetchXML - NETWORG Blog (thenetw.org)

    (+) FetchXML "OR" Condition using multiple link-entities - Microsoft Dynamics CRM Forum Community Forum 

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,409 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans