Paging with FetchXML

In MS CRM 2016 on-premises and online, fetchXML came up with a new attribute called “page”. Using this attribute we can set which page results we want.

<fetch mapping="logical" page="1" count="2">
 <entity name="account">
  <attribute name="accountid" />
  <attribute name="name" />
  <order attribute="name" />
 </entity>

</fetch>

Above query set query for accounts and limit the number of entities to 2 and return just the first page.


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...