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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Querying the Web API t...
Power Apps
Answered

Querying the Web API to filter on parent of a parent returns an error.

(1) ShareShare
ReportReport
Posted on by 10

We are trying to filter all expenses that are linked to a quote through the Project, and then Sales Order which has the quote id we want to filter on. Here is the query

 

https://[env].crm.dynamics.com/api/data/v9.2/msdyn_estimatelines?$expand=msdyn_Project($expand=msdyn_salesorderid)&$filter=msdyn_Project/msdyn_salesorderid/_quoteid_value%20eq%20%27c0e204d2-1a1f-ee11-9cbd-0022482559b6%27 
{"error":{"code":"0x80040216","message":"entityRelationshipRole for given navigation property not found"}}

 

It looks like it can find the relationships because if we type them wrong, then the error is that they can't be found. Is this a limitation of the Web API (OData) implementation in the DataVerse or something else?

 

The same query using fetch XML works fine.

I have the same question (0)
  • Verified answer
    narayan225 Profile Picture
    2,547 Moderator on at

    You can use XRM Toolbox FetchXML Builder Tool to convert your query to webapi request:

    narayan225_0-1689135830647.png

    Cheers!

  • lpperras_exp Profile Picture
    10 on at

    Thank you for the reply. Using FetchXML Builder Tool, it can't convert that query, so maybe it is a limitation of the WebAPI vs the FetchXML.

     

    Appreciate the idea!

  • a33ik Profile Picture
    3,306 Most Valuable Professional on at

    That should work. Try to build FetchXml query and use it in your 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 Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 93 Most Valuable Professional

#2
Haque Profile Picture

Haque 81

#3
Valantis Profile Picture

Valantis 49

Last 30 days Overall leaderboard