How to Create Fetch XML Query From Dynamics 365

How to Create Fetch XML Query From Dynamics 365

Nikita Rohira

January 28th, 2022

In Dynamics 365, you can use the fetch XML query in the web API to retrieve specific data. With the help of advanced find feature, you can carry out querying easily.

You need to follow below steps to create the fetch XML Query.

Step 1: Open Advanced Find

Firstly you have to login to your account and then click on the Advanced Find button (funnel icon) in the upper right-hand corner.

Open Advanced Find

Open Advanced Find

Once you click on the “Advanced Find” button, the below screen will be open.

Advanced Find-1

Set the entity and view to fetch XML query.

Advanced Find-2

Step 2: Create New Query

Then click on a New button at the top under Advanced Find section to create a query.

Create New Query-1

Create New Query-2

Step 3: Enter the Additional Information to the Different Queries

Then select the field on which you want to perform a query.

Here, we want to find a name that has an age above 25.

Different Queries-1

Then select the Operator for which you want to perform the query, in this case it is Age.

Different Queries-2

Then enter the value for comparison i.e. Equals, Does Not Equal, Contains Data, Does Not Contain Data, Under, and Not Under.

Different Queries-3

Step 4: Generate Results

Then click on the Result button to check if the query is working properly or not.

Generate Results-1

Generate Results-2

You can see the output like this.

Download the XML Query

Step 5: Download the XML Query

If the query is working properly then click on the Download Fetch XML button to download the XML query.

Download the XML Query-1

Download the XML Query-2

We can find the downloaded file from the download folder then we can open and check it.

Download the XML Query-3

Download the XML Query-4

You can use this query in the web API to retrieve specific data.

 
All product and company names are trademarks™, registered® or copyright© trademarks of their respective holders. Use of them does not imply any affiliation with or endorsement by them.

Read Related Blogs About Dynamics CRM

How to Embed HTML Web Resource in CRM’s Entity Form

How to Embed HTML Web Resource in CRM’s Entity Form

3 Min
How to Add Tasks and Appointments in MappyField

How to Add Tasks and Appointments in MappyField

3 Min
Smart Alerts for Safe, Simple, and Fast Return-to-Work

Smart Alerts for Safe, Simple, and Fast Return-to-Work

2 Min