[英]How can I retrieve all records (more than 5000 and/or more than 1 page) with the Dynamics 365 Web API in a Dynamics CRM organization with a C# plugin?
[英]Show more than 5000 records from CRM in C#
我试图了解 FetchXml 的工作原理(或任何其他方法),因为我想检索和处理超过 CRM 在下面的 api 调用中返回的 5000 条记录的限制。
我的基础 url 看起来像这样: http://crm.domain.com:1234/api/data/v8.0/
资源是: emails
和查询选项是: $top=50000&$filter=description ne null and not contains(sender, '@not-interesting.com')
但我在创建OrganizationServiceProxy
object 时遇到问题,如下所示:
var creds = new ClientCredentials();
creds.UserName.UserName = CrmApiUsername;
creds.UserName.Password = CrmApiPassword;
using (var _serviceProxy = new OrganizationServiceProxy(
new Uri(CrmApiBaseAddress), null, creds, null))
{
// This statement is required to enable early-bound type support.
_serviceProxy.EnableProxyTypes(); // ...
我收到一个错误:
元数据包含无法解析的引用:' http://crm.domain.com:1234/data/v8.0/?wsdl&sdkversion=90 '。 WebException:远程服务器返回错误:(404)未找到。
你混淆了这两个:
When you use web api the url will be like: https://yourcrm.crm#.dynamics.com/api/data/v8.0/
如果组织服务代理仍然是 2011 端点: https://yourcrm.crm.dynamics.com/XRMServices/2011/Organization.svc
为了打破 5000 条记录的限制并获得超过 5k 条记录,必须使用分页概念。 如何从 CRM 中获取 5000 多个实体
有关更多想法,我已经在这个SO 线程中回答了其他选项。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.