我正在通过c#中的fetchxml访问dynamics数据。当我试图执行以下查询时,会出现以下错误。
AggregateQueryRecordLimit超过。无法执行此操作。
<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false' aggregate='true'>
<entity name='productclass'>
<attribute name='classificationidid' groupby='true' alias='classidid'/>
<attribute name='productidid' aggregate='count' alias='ProductCount' />
<filter type='and'>
<condition attribute='classidid' operator='in'>" + cIds + @"</condition>
</filter>
</entity>
如何解决这个问题?
发布于 2017-02-16 07:04:02
这是因为实体productclass包含的记录比AggregateQueryRecordLimit设置中的当前限制多。
您可以通过使用下面描述的powershell扩展来改变这一点:http://msdn.microsoft.com/en-us/library/2a4061cd-e6b4-4672-8c44-20a27c523718
http://msdn.microsoft.com/en-us/library/gg334634.aspx提供了一个完整的设置列表,但请记住,更改此设置可能会影响性能。
发布于 2017-02-16 17:30:19
客户关系管理( CRM )正在努力避免被过多的数据所窒息。
我建议的优化过程的尝试是运行多个查询,每个cIds元素一个查询(从而从in切换到eq操作符,IIRC)。您将为每个元素得到一个结果集,您将能够在代码中合并这些结果集(这对于LINQ来说很简单)。
我的另一个建议是让您升级CRM:在最新版本中,您有Rollup,这些字段正是为对相关记录进行聚合而设计的。
https://stackoverflow.com/questions/42266532
复制相似问题