Skip to main content

Notifications

Dynamics 365 general forum

FetchXML Link Entity that is linked to another with a filter question about inner and outer.

Posted on by 5

How come a double link-entity is different to one link entity filter?

So say there's entity Colour that has a lookup to Car entity and the Car is linked to the CEO User entity.

If there's a link-entity to Car from Colour that's filtered on the CEO of Toyota, all the colours will show even if there's no colour attached to the CEO.

But if I do a link-entity from from Car to CEO User entity and filter it on this, the outer will show all colours including other CEOs and inner won't show the empty ones. 

How come this happens? And is there a way to show all colours with a two level link entity?

Categories:
  • Suggested answer
    LeoAlt Profile Picture
    LeoAlt 16,329 on at
    RE: FetchXML Link Entity that is linked to another with a filter question about inner and outer.

    Hi partner,

    First of all, you should know the difference between "inner join", "outer join", "left join" and "right join".

    1.Inner Join: The inner join keyword selects records that have matching values in both tables.

    2.Outer Join: It's also called "Full join", it selects all the records of tables.

    3.Left Join: It returns all records from the left table and matches records from the right table. The result is NULL from the right side, if there is no match.

    4.Right Join: Contrary to Left Join.

    In your case, I think that you need to use a condition like "Left join".

    About how to use "left join" in fetchxml, you could refer to this blog.

    https://www.powerobjects.com/blog/2013/11/07/perform-left-join-fetchxml-display-results-crm-2013/

    https://docs.microsoft.com/en-us/powerapps/developer/common-data-service/use-fetchxml-left-outer-join-query-records-not-in

    You could also show us your requirement with more details and what records do you want to query?

    Hope it helps.

    Best Regards,

    Leo

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans