[英]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.