Showing results for 
Search instead for 
Did you mean: 
New Member

fetch xml query limitaion and guidance


I have few questions when i am building my fetch xml to retrive the data , it would be great if someone can help me with suggestions or approach.


1. I have 3 entities ( entity1,entity2,entity3)


E1C1       E1C2  

1              user1         

2              user2

    Entity2 ( relationship to Entity1 is 1 (Entity1) : N (entity2) :E1c1 is the realtionsjip)

E2C1    E2C2      E1C1

1          State1       1

1          State1       2

2          Stae2       2 

3          Stae3       2 

    Entity 3( relationship to Entity2 is 1 (Entity2) : N (entity3) :E2C1 is the realtionship)

E3C1 E3C2    E2C1

1        City1      1

1        City1      2

2        City2      1

3        City4       2

I want the data with this filtering conditions (E1C2=user1 and E2C2  = 1 and  E3C2=City 2) OR (E1C2=user2 and E2C2=State2 and E3C2=City4) 

The relationship between the tables are manditory there can be records in Entity1 but not related to any record in Entuty2 and same  for Entity3

i am finding diffidulty to have these conditons of multiple entities which are related for these cases

1. The column filters are related and if i have to apply the and operator on individual table thats not possible

2. If i apply the filters at once using alias, as these record relationship are not manditory across entity some column may miss out for the joins.

Let me know if someone had these issues or some thoughts on this.


Thanks in advance,


Solution Sage
Solution Sage

What do you need the data for use in? if it is just a report create multiple datasets and do the other required manipulation in the reporting tool.  Your other option would be to try doing an outer join rather than the default which is an inner join (but if the data sets are large this may not be recommended) 

<link-entity name='lead' from='leadid'  to='originatingleadid' link-type='outer'/>

Helpful resources

Ignite 2022


Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (4,789)