cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MichielVanduren
Frequent Visitor

entitylist metadata fetchxml filter with nested link-entities not working

Hi, 

 

I have this metadata fetchxml filter that I can't get to working.

It has 2 link-entities, it is starting from the scheduline entity, joining with salesorderdetail entity, and another join with the salesorder entity :

MichielVanduren_0-1640093887416.png

If there something wrong with the syntax?

 

If I try it with one link-entity, it's working.

Starting again from the scheduline entity and joining directly to the salesorder entity.

MichielVanduren_1-1640093999046.png

 

We want to use the first option, as we do not want to link directly between the scheduline and salesorder entities.

Any ideas?

 



 

1 ACCEPTED SOLUTION

Accepted Solutions
chleverenz
Super User
Super User

Hi @MichielVanduren ,

Do you get an errormessage or does it simply not work?

 

I would not use like in conjunction with "" (well, it works with one linked entity less, so shouldn't be the problem) - i would prefer not-null as an operator 🙂 .

 

Have you set up ALL entitypermission for all tables? if not, it may fail.

 

It could be, that the permissionsystem from portals spoiles it up. Have you tried giving global read to the involved entities? (Yes, you do not want this, i know 🙂  - it's just for a test.) When this works, adding entitypermissions could go wrong.

 

We had issues especially, when i set up too many entitypermissions. I got an errormessage that the number of allowed link-entities was exceeded...

 

Hopefully, this points in a solution direction.

Have fun,

  Christian

 

PS i try this kind of things out in the xrm-toolbox fetchhelper. This gives great responses in terms of wrong fetchxmls...

View solution in original post

3 REPLIES 3
chleverenz
Super User
Super User

Hi @MichielVanduren ,

Do you get an errormessage or does it simply not work?

 

I would not use like in conjunction with "" (well, it works with one linked entity less, so shouldn't be the problem) - i would prefer not-null as an operator 🙂 .

 

Have you set up ALL entitypermission for all tables? if not, it may fail.

 

It could be, that the permissionsystem from portals spoiles it up. Have you tried giving global read to the involved entities? (Yes, you do not want this, i know 🙂  - it's just for a test.) When this works, adding entitypermissions could go wrong.

 

We had issues especially, when i set up too many entitypermissions. I got an errormessage that the number of allowed link-entities was exceeded...

 

Hopefully, this points in a solution direction.

Have fun,

  Christian

 

PS i try this kind of things out in the xrm-toolbox fetchhelper. This gives great responses in terms of wrong fetchxmls...

MichielVanduren
Frequent Visitor

thanks for the reply.

I don't get an error message, all the records are returned, so it seems that it doesn't take into account this filter.
I tried deactivating all my existing entity permissions on these entities and replacing them with global entity permissions, but that didn't solve it.

The xrm-toolbox fetchhelper tool, I don't know and can't find it, do you mean the fetchxml builder?

The fetchxml builder, I already use to validate my fetchxml.

 

Is there some place where I can see what query is executed on the datasource (Dataverse)?

chleverenz
Super User
Super User

Hi @MichielVanduren ,

hm, sounds strange. I do not know of a place where the real fetch is stored or legged. May be you can make the link-entity stuff invalid so that it thows an error. May be that one is logged in the trace log somewhere.

If all else fails you could write a plugin (which is executed upon every retrievemultiple and look, what fetchxml is sent. But i have to admit: a lot of work to debug something.

Have fun,

  Christian

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

MPP IDEAS updated 768x460.png

Ideas

Discover ideas and concepts from users like you for how to use Power Pages and take your work to the next level.

Top Solution Authors
Users online (2,770)