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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Fetch recursive relationship

(0) ShareShare
ReportReport
Posted on by 109

Hi all,

I need to get all Opportunities that are linked to accounts that match my criteria for accounts (for simplicity sake, lets say I want all active accounts) AND all opportunities that are also linked to all of the accounts that have hierarchical relationship to the account the opportunity is directly linked to.

For example, if I have an Account A and it's a parent to 3 other accounts (B,C,D), I want to fetch all Opportunities where Account A is the Client and all of the opportunities where Accounts B,C,D are also Clients. 

Anyone knows how to achieve this? 

TIA,

-TS.

*This post is locked for comments

I have the same question (0)
  • Dynamics Objects 365 Profile Picture
    550 on at

    May be this can help designing your fetchxml  for v9.1- docs.microsoft.com/.../query-hierarchical-data

  • Tony Suslovich Profile Picture
    109 on at

    Thanks for your suggestion. Unfortunately this doesn't solve my issue. They have value = '{0}' and it's referring to an input parameter from what I understand. My issue is I don't have a specific GUID, I have a bunch of then and I need to fetch everything in 1 query.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans