Basically I have a QueryExpression that returns over 3000 results. I only need to use between 50 and 200 of these. If I was using normal sql I could use SELECT TOP 200..... Is there a way to do this in CRM using the QueryExpression or FetchXML?
In a QueryExpression:
QueryExpression query = new QueryExpression();
query.PageInfo = new PagingInfo();
query.PageInfo.Count = 200; // or 50, or whatever
query.PageInfo.PageNumber = 1;
In Fetch XML:
<fetch mapping='logical' page='1' count='200'>
...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With