When to use FetchXML?

Platform

The Power Platform uses FetchXML internally to query the Common Data Service (CDS) for information.

Apps

Views in Model Driven apps and Canvas apps are defined with a FetchXML statement and a LayoutXML definition to specify how data is retrieved and how it is rendered.

Code

C# code can query the database using object of types QueryExpression, QueryByAttribute or FetchExpression. In the end, they all translate to FetchXML in the backend.
Basic information about how to execute FetchXML from code is available here.
Using the WebAPI endpoint supporting OData v2.0, you can use FetchXML too, read more about that here.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.