FetchXML Tutotorial

What Is FetchXML ?

FetchXML is a query language that is used in Common Data Service. It’s based on a schema that describes the capabilities of the language. The FetchXML language supports similar query capabilities as query expressions. In addition, it’s used as a serialized form of query, used to save a query as a user-owned saved view in the UserQuery Entity and as an organization-owned saved view in the SavedQuery Entity.

FetchXML is proprietary query language used in Microsodt Dynamics CRM online or on-premises. It is used to retrieve records from an entity.

The following fetchxml query, selects the “CustomerName” and “City” columns from the “Customers” Entity:
Key Point:
cr685_customers – It is a logical name of customers.
<fetch mapping="logical" version="1.0" >
<entity name="cr685_customers" >
<attribute name="cr685_customername" />
<attribute name="cr685_city" />

After run this query you will get all customername and city from Customers Entity.You can also use XRM Toolbox for test your query.
<cr685_customername>Rajesh Kumar</cr685_customername>
<cr685_customername>Mahesh Singh</cr685_customername>


Leave a Reply

Your email address will not be published.