Retrieve all attributes using FetchXML in MS CRM




Below code snippets gives an example on how to retrieve all the attributes from an entity using fetch xml.

<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false' count='1'>
  <entity name='new_account'>
    <all-attributes />
    <order attribute='createdon' descending='true' />
    <filter type='and'>
      <condition attribute='new_name' operator='eq' value='Test' />
    </filter>
  </entity>

</fetch>

<all-attributes />  will fetch you all attributes in fetch XML.








No comments:

Post a Comment

Featured Post

Improving MS CRM Performance

Performance on MS CRM is always a crucial thing and we may follow different ways to achieve the performance thing. Below is the one more a...