What’s the difference between FetchXML and QueryExpression? – MS CRM 2011

To Query MS CRM DB there are the two distinct ways.

  • Using QueryExpression
  • Using FetchXML

Limitation of the QueryExpression is , If you are Querying CRM DB using QueryExpression you cannot able to set Related Entity columns as filter criteria to return the Query Result.

Where as using FetchXML , you can set the Related Entity columns in filter criteria to return the Query Result.

Note: CRM also provides the following messages to convert FetchXML to QueryExpression and vice versa.

– FetchXmlToQueryExpression : Converts from FetchXML to query expression.
– QueryExpressionToFetchXml : Converts from query expression to FetchXML.

Note again, if you are to convert a FetchXML that has select columns specified from related entity, to Query Expression, the related entity columns are not included in the QueryExpression columns list.

 

Cheers,

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s