2

我如何向 CRM Dynamics 查询前 50 条记录,例如 sqlserver 中的 top。

谢谢,

4

3 回答 3

5

您想要分页:在 CRM 4 中使用 QueryExpression 时是否可以限制响应中返回的结果数量

于 2011-08-01T13:03:17.627 回答
0

您需要 QueryExpression 属性TopCount

var query = new QueryExpression(entity) {
     ColumnSet = new ColumnSet(someColumns),
     Criteria = {
         Conditions = ...
     },
     TopCount = 50
 };
于 2019-08-28T09:48:43.600 回答
0

您可以使用 fetch xml 如下所示:

<fetch top="50" >
  <entity name="contact" >
    <attribute name="contactid" />
    <attribute name="fullname" />
  </entity>
</fetch>
于 2021-10-29T16:00:47.240 回答