我想知道我可以编写本机SQL来添加或删除操作而不是使用Query Expression或FetchXML等.我知道Query Expression非常有用,但我真正关心的是性能,我认为编写SQL可能比其他更快.
crm dynamics-crm query-expressions fetchxml dynamics-crm-2011
正如我从谷歌搜索中了解到的那样,MSCRM 2011检索最多5000个实体,但我希望我的所有实体都来自营销列表.正如在Web上创建的,在HKLM\Software\Microsoft\MSCRM上创建"TurnOffFetchThrottling"字段并将值设置为1可以解决此5000限制问题(此外,我在注册表中添加了MaxRowsPerPage字段并将其值设置为超过5000,但它也不起作用).我试了一下,我得到了System.OutOfMemory Exception错误.顺便说一句,当我删除""并只是获取id属性代码完美,但我需要所有属性.这是我的fetchxml代码:
enter code here
string fetchXml = "<fetch mapping='logical' >"
+ "<entity name='" + entityType.LogicalName + "'>"
+ "<all-attributes />"
+ "<link-entity name='listmember' to='" + entityType.LogicalName + "id" + "' from='entityid'>"
+ "<filter>"
+ "<condition attribute='listid' operator='eq' value='" + chosenMarketingListGuid + "'/>"
+ "</filter>"
+ "</link-entity>"
+ "</entity>"
+ "</fetch>";
Run Code Online (Sandbox Code Playgroud)
我又尝试了一件事,我将fetchxml更改为:
enter code here
string fetchXml = "<fetch mapping='logical' >"
+ "<entity name='listmember'>"
+ "<all-attributes />"
+ "<filter>"
+ "<condition attribute='listid' operator='eq' value='" + chosenMarketingListGuid + "'/>"
+ …Run Code Online (Sandbox Code Playgroud)