开发者

Select top 10 records in MS Dynamics CRM

开发者 https://www.devze.com 2023-03-25 14:06 出处:网络
how can i query to CRM Dynamics for top 50 records like top开发者_高级运维 in sqlserver. thanks,You want paging: Is it possible to limit the amount of results returned in a response when using a Quer

how can i query to CRM Dynamics for top 50 records like top开发者_高级运维 in sqlserver.

thanks,


You want paging: Is it possible to limit the amount of results returned in a response when using a QueryExpression in CRM 4


You can use fetch xml something like below:

<fetch top="50" >
  <entity name="contact" >
    <attribute name="contactid" />
    <attribute name="fullname" />
  </entity>
</fetch>


You need the QueryExpression property TopCount :

var query = new QueryExpression(entity) {
     ColumnSet = new ColumnSet(someColumns),
     Criteria = {
         Conditions = ...
     },
     TopCount = 50
 };
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号