计算Dynamics CRM Online Web API(ODATA)中的所有行 [英] Counting ALL rows in Dynamics CRM Online web api (ODATA)

查看:309
本文介绍了计算Dynamics CRM Online Web API(ODATA)中的所有行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以对给定实体中的所有行进行计数,从而绕过5000行限制和页面大小限制?

Is it possible to count all rows in a given entity, bypassing the 5000 row limit and bypassing the pagesize limit?

我不想在一个请求中返回超过5000行,而只想要该给定实体中所有行的计数.

I do not want to return more than 5000 rows in one request, but only want the count of all the rows in that given entity.

根据Microsoft,您不能在请求URI中进行此操作:

According to Microsoft, you cannot do it in the request URI:

The count value does not represent the total number of entities in the system. 

It is limited by the maximum number of entities that can be returned.

我已经尝试过:

GET [Organization URI]/api/data/v9.0/accounts/?$count=true

还有其他方法吗?

推荐答案

使用功能

如果要检索超过5000个实体的记录总数,请使用RetrieveTotalRecordCount函数.

If you want to retrieve the total number of records for an entity beyond 5000, use the RetrieveTotalRecordCount Function.

您的查询将如下所示:

https://<your api url>/RetrieveTotalRecordCount(EntityNames=['accounts'])

这篇关于计算Dynamics CRM Online Web API(ODATA)中的所有行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆