Answered by:
Charts not displaying in CRM 2011 - "There was an error while retreiving the data from Microsoft Dynamics CRM"

Question
-
Hi guys,
I've recently imported a CRM4 organisation across with about 130,000 contact records. There are certain tick boxes against the contact records I'd like to chart on, however, if I try and create a chart from the "Active Contacts" view, it will give me the error "Threre was an error while retreiving the data from Microsoft Dynamics CRM"
After looking through logs etc I found nothing that would indicate a problem with the setup - all other organisations reports and charts work fine.
I found however, when I filtered the data down, the charts came back to life again.
Is there a limit to how many records that you can chart on? Or is there a setting I change to stop this error? It really isn't any good if I can only chart on a very small portion of the entire database, and makes the charting almost useless for our purposes. This is extremely urgent as we need this system to demonstrate on next week, and the lack of charting is a deal-breaker.
Thanks,
George
Accelero CRM
Wednesday, April 6, 2011 1:45 AM
Answers
-
This is because of the limit we impose on the number of records allowed during aggregation. The limit is 50,000 records and hence the error. You can change this limit at the following locations:
on server - Change the value of AggregateQueryRecordLimit row in DeploymentProperties table in ConfigDB.
on client (offline outlook client) - Change the value of registry key HKCU\Software\Microsoft\MSCRMClient\AggregateQueryRecordLimit
- Marked as answer by George Darwent Thursday, April 7, 2011 6:40 AM
Thursday, April 7, 2011 5:00 AM
All replies
-
Hi George,
Need some more information. There would be more details regarding the error that you are seeing in the server traces file. Could you please look into this and let us know.
To enable server tracing, you can use the following registry key settings on the CRM server machine. You'll find the trace file in <installation folder>/trace/
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSCRM]
"TraceEnabled"=dword:00000001
"TraceCategories"="*:Error"
"TraceCallStack"=dword:00000000
"TraceRefresh"=dword:00000001
"TraceSchedule"="Hourly"
"EnableNowTestHook"=dword:00000001
"TraceBufferEnabled"=dword:00000001
"NotificationTestHookEnabled"=dword:00000001
Thanks,
Karuna
Wednesday, April 6, 2011 9:05 AM -
Hi Karuna,
Thanks for that.
I think this is the error from the trace log :[2011-04-07 09:11:10.378] Process: w3wp |Organization:fc705706-683d-e011-aaeb-005056ae615c |Thread: 75 |Category: Application |User: 00000000-0000-0000-0000-000000000000 |Level: Error | Visualization.Render
>Rendering of visualization failed with exception: Microsoft.Crm.CrmException: AggregateQueryRecordLimit exceeded. Cannot perform this operation.
at Microsoft.Crm.Application.Platform.ServiceCommands.PlatformCommand.XrmExecuteInternal()
at Microsoft.Crm.Application.Platform.ServiceCommands.RetrieveEntitiesForAggregateQuery.Execute()
at Microsoft.Crm.Application.Platform.Visualization.VisualizationDataProviderBase.LoadData()
at Microsoft.Crm.Application.Controls.VisualizationUIProvider.RenderVisualization(HtmlTextWriter htmlBodyWriter)
at Microsoft.Crm.Web.Charts.Visualization.Render(HtmlTextWriter output)
[2011-04-07 09:11:22.644] Process: w3wp |Organization:fc705706-683d-e011-aaeb-005056ae615c |Thread: 48 |Category: Exception |User: ccd8dd58-683d-e011-aaeb-005056ae615c |Level: Error | CrmException..ctor
at CrmException..ctor(String message, Exception innerException, Int32 errorCode, Boolean isFlowControlException)
at CrmException..ctor(String message, Int32 errorCode)
at BusinessProcessObject.CheckForAggregateLimit(IDataRecord record, String aggregateLimitExceededName)
at BusinessProcessObject.FillEntityCollectionFromDataReader(BusinessEntityCollection entities, IDataReader reader, EntityExpression entityExp, Boolean useEntityExpression, String aggregateLimitExceededName, ExecutionContext context)
at BusinessProcessObject.QueryAndFillEntityCollection(CrmDbConnection dbConnection, IDbCommand dbCommand, BusinessEntityCollection entities, EntityExpression entityExp, PagingHelper pagingHelper, Boolean useEntityExpression, String aggregateLimitExceededName, ExecutionContext context)
at BusinessProcessObject.DoRetrieveMultiple(BusinessEntityCollection entities, EntityExpression entityExp, DatabaseQueryTarget queryTarget, PagingHelper pagingHelper, ExecutionContext context)
at BusinessProcessObject.DoRetrieveMultiple(BusinessEntityCollection entities, EntityExpression entityExp, DatabaseQueryTarget queryTarget, ExecutionContext context)
at BusinessProcessObject.RetrieveMultiple(EntityExpression entityExpression, DatabaseQueryTarget queryTarget, ExecutionContext context)
at AggregationQueryService.RetrieveEntitiesForAggregateQuery(EntityExpression outerQuery, Dictionary`2 subQueries, ExecutionContext context)
at RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
at RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at LogicalMethodInfo.Invoke(Object target, Object[] values)
at InternalOperationPlugin.Execute(IServiceProvider serviceProvider)
at V5PluginProxyStep.ExecuteInternal(PipelineExecutionContext context)
at VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context)
at Pipeline.Execute(PipelineExecutionContext context)
at MessageProcessor.Execute(PipelineExecutionContext context)
at InternalMessageDispatcher.Execute(PipelineExecutionContext context)
at ExternalMessageDispatcher.ExecuteInternal(IInProcessOrganizationServiceFactory serviceFactory, IPlatformMessageDispatcherFactory dispatcherFactory, String messageName, String requestName, Int32 primaryObjectTypeCode, Int32 secondaryObjectTypeCode, ParameterCollection fields, CorrelationToken correlationToken, CallerOriginToken originToken, UserAuth userAuth, Guid callerId, Guid transactionContextId, Int32 invocationSource, Nullable`1 requestId, Version endpointVersion)
at OrganizationSdkServiceInternal.ExecuteRequest(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType)
at OrganizationSdkServiceInternal.Execute(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType)
at InprocessServiceProxy.ExecuteCore(OrganizationRequest request)
at PlatformCommand.XrmExecuteInternal()
at RetrieveEntitiesForAggregateQuery.Execute()
at VisualizationDataProviderBase.LoadData()
at VisualizationUIProvider.RenderVisualization(HtmlTextWriter htmlBodyWriter)
at Visualization.Render(HtmlTextWriter output)
at Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at Page.ProcessRequest()
at Page.ProcessRequest(HttpContext context)
at CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
at ApplicationStepManager.ResumeSteps(Exception error)
at HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData)
at HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr)
at ISAPIRuntime.ProcessRequest(IntPtr ecb, Int32 iWRType)Wednesday, April 6, 2011 11:21 PM -
This is because of the limit we impose on the number of records allowed during aggregation. The limit is 50,000 records and hence the error. You can change this limit at the following locations:
on server - Change the value of AggregateQueryRecordLimit row in DeploymentProperties table in ConfigDB.
on client (offline outlook client) - Change the value of registry key HKCU\Software\Microsoft\MSCRMClient\AggregateQueryRecordLimit
- Marked as answer by George Darwent Thursday, April 7, 2011 6:40 AM
Thursday, April 7, 2011 5:00 AM -
Worked like a charm, thanks so much!
Thursday, April 7, 2011 6:41 AM -
This sie limitation is also present in the Online environment so how can the value be changed in ConfigDB?Friday, June 17, 2011 8:12 AM
-
This is because of the limit we impose on the number of records allowed during aggregation. The limit is 50,000 records and hence the error. You can change this limit at the following locations:
on server - Change the value of AggregateQueryRecordLimit row in DeploymentProperties table in ConfigDB.
on client (offline outlook client) - Change the value of registry key HKCU\Software\Microsoft\MSCRMClient\AggregateQueryRecordLimit
Any solution for CRM 2011 Online?z.
Tuesday, July 5, 2011 3:06 PM -
Would be nice if the error showed up in the event viewer. We don't have Trace running all the time, only on major issues.Monday, August 29, 2011 2:29 PM
-
i think for the online environment, you could use the UpdateAdvancedSettingsRequest message:
More information about these settings here:
http://msdn.microsoft.com/en-us/library/gg334634.aspx
http://nzcrmguy.blogspot.com/ http://nzspguy.blogspot.com/Friday, September 30, 2011 12:07 AM -
i think for the online environment, you could use the UpdateAdvancedSettingsRequest message:
More information about these settings here:
http://msdn.microsoft.com/en-us/library/gg334634.aspx
*havent tested this message for the online environment though
http://nzcrmguy.blogspot.com/ http://nzspguy.blogspot.com/Friday, September 30, 2011 12:10 AM