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
};
精彩评论