开发者

Select top 10 records in MS Dynamics CRM

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜