rappen / FetchXMLBuilder

FetchXML Builder for XrmToolBox and Microsoft Dynamics 365 / CRM
https://fetchxmlbuilder.com/
GNU General Public License v3.0
133 stars 55 forks source link

AggregateQueryRecordLimit exceeded. Cannot perform this opertaion. #1016

Closed AbdulWahabWarind closed 5 months ago

AbdulWahabWarind commented 5 months ago

[Write any error info to resolve easier]


System.ServiceModel.FaultException<Microsoft.Xrm.Sdk.OrganizationServiceFault>:
AggregateQueryRecordLimit exceeded. Cannot perform this operation.
FetchXML Builder

Server stack trace: 
- System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
- System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
- System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
- System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]: 
- Microsoft.Xrm.Tooling.Connector.CrmServiceClient.RetrieveMultiple(QueryBase query)
- Rappen.XTB.FetchXmlBuilder.FetchXmlBuilder.RetrieveMultiple(QueryBase query, Boolean allrecords)
- Rappen.XTB.FetchXmlBuilder.FetchXmlBuilder.<>c__DisplayClass125_0.<RetrieveMultiple>b__0(BackgroundWorker worker, DoWorkEventArgs eventargs)
- System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)
- System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)

<fetch aggregate="true">
  <entity name="maa_inventorybeneficiary">
    <attribute name="maa_country" alias="country" groupby="true" />
    <attribute name="maa_dob" alias="dobDay" groupby="true" dategrouping="day" />
    <attribute name="maa_dob" alias="dobMonth" groupby="true" dategrouping="month" />
    <attribute name="maa_dob" alias="dobYear" groupby="true" dategrouping="year" />
    <attribute name="maa_familyname" alias="familyname" groupby="true" />
    <attribute name="maa_firstname" alias="firstname" groupby="true" />
    <attribute name="maa_nationality" alias="nationality" groupby="true" />
    <attribute name="maa_partner" alias="partner" groupby="true" />
    <attribute name="maa_partnerbeneficiaryid" alias="partnerbeneficiaryid" groupby="true" />
    <attribute name="maa_inventorybeneficiaryid" alias="count" aggregate="count" />
  </entity>
</fetch>

BetimBeja commented 5 months ago

Hi @AbdulWahabWarind that is a platform limitation. There is no issue with the tool. https://learn.microsoft.com/en-us/power-apps/developer/data-platform/use-fetchxml-aggregation#limitations

AbdulWahabWarind commented 5 months ago

Okay, thank you for your prompt response.

rappen commented 5 months ago

And thanks both of you :) I'll close this issue now, please reopen if I can produce better error messages or similar!