FetchXMLBuilder icon indicating copy to clipboard operation
FetchXMLBuilder copied to clipboard

Not sure what the issue is with this particular fetch. It appears correct to me.

Open JFulfordMS opened this issue 2 years ago • 2 comments


System.ServiceModel.FaultException<Microsoft.Xrm.Sdk.OrganizationServiceFault>:
Object reference not set to an instance of an object.

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)
- Cinteros.Xrm.FetchXmlBuilder.FetchXmlBuilder.<>c__DisplayClass134_0.<RetrieveMultiple>b__0(BackgroundWorker worker, DoWorkEventArgs eventargs)
- System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)
- System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)

<fetch top="1000" aggregate="true">
  <entity name="audit">
    <attribute name="createdon" alias="LastLogin" aggregate="max" />
    <filter>
      <condition attribute="operation" operator="eq" value="4" />
    </filter>
    <link-entity name="systemuser" from="systemuserid" to="objectid">
      <attribute name="fullname" alias="fn" groupby="true" />
    </link-entity>
  </entity>
</fetch>

  • FetchXML Builder Version: 1.2022.2.54
  • DB Version: 9.2.22015.131
  • Deployment: Online

JFulfordMS avatar Mar 10 '22 15:03 JFulfordMS

The audit entity was modified recently so it no longer lives in SQL storage - https://powerapps.microsoft.com/en-us/blog/announcing-new-dataverse-auditing-features/

This limits the queries that it's possible to run against it. My guess is that this error is coming from the virtual table data provider that's being used behind the scenes here not understanding what otherwise looks like a valid FetchXML query, and not something you can avoid easily in your query.

MarkMpn avatar Mar 10 '22 15:03 MarkMpn

Makes sense, I was afraid it was a quirk in the audit records. Thank you!


Jordan Fulford Manager, Software Development and Engineering 9000 Southside Blvd. Suite 1900, Jacksonville, FL 32256 Phone: (904) 813-7771 | Ext: 334 Email: @.*** Need help with personal or business taxes? Visitwww.moneysolver.orgtoday.

This email message and any attachments to it, are for the sole use of the intended recipients, and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution of this email message or its attachments is prohibited. If you are not the intended recipient, please contact the sender by reply mail and destroy all copies of the original message. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, while the company uses virus protection, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. From: Mark Carrington @.> Sent: Thursday, March 10, 2022 10:46:41 AM To: rappen/FetchXMLBuilder @.> Cc: Jordan Fulford @.>; Author @.> Subject: Re: [rappen/FetchXMLBuilder] Not sure what the issue is with this particular fetch. It appears correct to me. (Issue #674)

The audit entity was modified recently so it no longer lives in SQL storage - https://powerapps.microsoft.com/en-us/blog/announcing-new-dataverse-auditing-features/https://protection.greathorn.com/services/v2/lookupUrl/6c62902c-3056-4541-a8e2-2cd149243028/461/a62dbf912c2e90922059990579064f437956a122?domain=powerapps.microsoft.com&path=/en-us/blog/announcing-new-dataverse-auditing-features/

This limits the queries that it's possible to run against it. My guess is that this error is coming from the virtual table data provider that's being used behind the scenes here not understanding what otherwise looks like a valid FetchXML query, and not something you can avoid easily in your query.

— Reply to this email directly, view it on GitHubhttps://protection.greathorn.com/services/v2/lookupUrl/a5d287bd-c459-4316-a427-40a42e589f55/461/a62dbf912c2e90922059990579064f437956a122?domain=github.com&path=/rappen/FetchXMLBuilder/issues/674, or unsubscribehttps://protection.greathorn.com/services/v2/lookupUrl/52eb3fe1-94be-4cec-9800-9dcb356826da/461/a62dbf912c2e90922059990579064f437956a122?domain=github.com&path=/notifications/unsubscribe-auth/AKFSHULYZ54EHQWLL4W3T33U7IKODANCNFSM5QM5QWTQ. Triage notifications on the go with GitHub Mobile for iOShttps://protection.greathorn.com/services/v2/lookupUrl/35e7a4e7-12bc-4a65-905e-2968204ad80c/461/a62dbf912c2e90922059990579064f437956a122?domain=apps.apple.com&path=/app/apple-store/id1477376905 or Androidhttps://protection.greathorn.com/services/v2/lookupUrl/50fc185d-eddd-4a99-98cb-ff7f35dd657f/461/a62dbf912c2e90922059990579064f437956a122?domain=play.google.com&path=/store/apps/details. You are receiving this because you authored the thread.Message ID: @.***>

JFulfordMS avatar Mar 10 '22 15:03 JFulfordMS