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

Error from FetchXML Builder #956

Closed robbfergus closed 6 days ago

robbfergus commented 1 year ago

This occurs when trying to retrieve data in FetchXML Builder when accessing Virtual tables in Dataverse. These tables reside in Business Central and exposed in Dataverse via Virtual Tables. This occurs for all such BC based VTs. Thanks


System.Xml.XmlException:
Data at the root level is invalid. Line 1, position 1.
FetchXML Builder
- System.Xml.XmlTextReaderImpl.Throw(Exception e)
- System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace()
- System.Xml.XmlTextReaderImpl.ParseDocumentContent()
- System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace)
- System.Xml.XmlDocument.Load(XmlReader reader)
- System.Xml.XmlDocument.LoadXml(String xml)
- Rappen.XTB.FetchXmlBuilder.AppCode.QueryInfo.set_Results(EntityCollection value)
- Rappen.XTB.FetchXmlBuilder.FetchXmlBuilder.<>c__DisplayClass124_0.<RetrieveMultiple>b__0(BackgroundWorker worker, DoWorkEventArgs eventargs)
- System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)
- System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)

<fetch top="50">
  <entity name="dyn365bc_department_theta_autotask_v1_0" />
</fetch>

rappen commented 1 year ago

It seems that the returned PagingCookie is not a valid XML. Is the virtual table a part of Dual Write? Or did you create this virtual manually? I'm testing with some "standard" virtual tables, but no problem there...

robbfergus commented 1 year ago

Hi Jonas,

Q1 It seems that the returned PagingCookie is not a valid XML. A1 I have not ever really used this so will investigate Q2 Is the virtual table a part of Dual Write? A2 I don't think so but will ask Joerg Q3 Or did you create this virtual manually? A3 I believe Joerg used the Dataverse connector, but will check with him I'm testing with some "standard" virtual tables, but no problem there...

Robb Fergus | Practice Lead | Theta D. +6499258573 | M. +6421593835 https://outlook.office.com/bookwithme/user/ @.**@.> | theta.co.nzhttps://www.theta.co.nz/ @.https://www.facebook.com/thetasystems @. https://www.twitter.com/thetanet @.*** https://nz.linkedin.com/company/theta-nz

From: Jonas Rapp @.> Sent: Wednesday, August 16, 2023 7:39 PM To: rappen/FetchXMLBuilder @.> Cc: Robb Fergus @.>; Author @.> Subject: Re: [rappen/FetchXMLBuilder] Error from FetchXML Builder (Issue #956)

You don't often get email from @.**@.>. Learn why this is importanthttps://aka.ms/LearnAboutSenderIdentification

It seems that the returned PagingCookie is not a valid XML. Is the virtual table a part of Dual Write? Or did you create this virtual manually? I'm testing with some "standard" virtual tables, but no problem there...

- Reply to this email directly, view it on GitHubhttps://github.com/rappen/FetchXMLBuilder/issues/956#issuecomment-1680114554, or unsubscribehttps://github.com/notifications/unsubscribe-auth/APSQTL5XKKHD2IK74H55DNLXVR2IRANCNFSM6AAAAAA3R23KY4. You are receiving this because you authored the thread.Message ID: @.**@.>>


This information is intended for the addressee only. It may contain confidential and legally privileged information. If you are not the intended recipient, please reply to advise the sender and do not disclose, copy or redistribute this document or any information contained herein.

Please consider the environment before printing this email.

robbfergus commented 1 year ago

Hi All,

The Virtual Tables are created by Business Central, i.e. a solution for Dataverse from Microsoft to connect to the Business Central API (Business Apps - Microsoft AppSourcehttps://appsource.microsoft.com/en-us/product/dynamics-365/microsoftdynsmb.businesscentral_virtualentity?tab=Overview)

We set up the API for these specific virtual tables to not allow modifications of data. So read-only.

Kind regards, Joerg

Joerg Rau | Head of Dynamics 365 | Theta D. +6493561941 | M. +64210391437 https://outlook.office.com/bookwithme/user/ @.**@.> | theta.co.nzhttps://www.theta.co.nz/ @.https://www.facebook.com/thetasystems @. https://www.twitter.com/thetanet @.*** https://nz.linkedin.com/company/theta-nz

From: Robb Fergus @.> Sent: Thursday, August 17, 2023 10:51 AM To: rappen/FetchXMLBuilder @.> Cc: Joerg Rau @.***> Subject: RE: [rappen/FetchXMLBuilder] Error from FetchXML Builder (Issue #956)

Hi Jonas,

Q1 It seems that the returned PagingCookie is not a valid XML. A1 I have not ever really used this so will investigate Q2 Is the virtual table a part of Dual Write? A2 I don't think so but will ask Joerg Q3 Or did you create this virtual manually? A3 I believe Joerg used the Dataverse connector, but will check with him I'm testing with some "standard" virtual tables, but no problem there...

Robb Fergus | Practice Lead | Theta D. +6499258573 | M. +6421593835 https://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Foutlook.office.com%2Fbookwithme%2Fuser%2F&data=05%7C01%7CJoerg.Rau%40theta.co.nz%7Cccfe4ffdba7040554d4708db9eab3351%7Cd1af847b2ce144cbbb50d5802bb43c8b%7C0%7C0%7C638278230357179941%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=oW1u7z3WKkrCD6VCNsSvdC0M7iDSodFFTW6NIt4q1RI%3D&reserved=0 @.**@.> | theta.co.nzhttps://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.theta.co.nz%2F&data=05%7C01%7CJoerg.Rau%40theta.co.nz%7Cccfe4ffdba7040554d4708db9eab3351%7Cd1af847b2ce144cbbb50d5802bb43c8b%7C0%7C0%7C638278230357179941%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=7CeMMRRu8BsIxsQelhlDG0Vi8su6ZFyQtscaB%2Bx8tbY%3D&reserved=0 @.https://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.facebook.com%2Fthetasystems&data=05%7C01%7CJoerg.Rau%40theta.co.nz%7Cccfe4ffdba7040554d4708db9eab3351%7Cd1af847b2ce144cbbb50d5802bb43c8b%7C0%7C0%7C638278230357179941%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=O5DVQUzNtGWRKkUplxjTT4bxxle0KV2vROyC9OScumU%3D&reserved=0 @. https://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.twitter.com%2Fthetanet&data=05%7C01%7CJoerg.Rau%40theta.co.nz%7Cccfe4ffdba7040554d4708db9eab3351%7Cd1af847b2ce144cbbb50d5802bb43c8b%7C0%7C0%7C638278230357179941%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=iTqzE50RdL5t4eFp5XCtG3eCicGtmx7Kr21XlJVAlDU%3D&reserved=0 @.*** https://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fnz.linkedin.com%2Fcompany%2Ftheta-nz&data=05%7C01%7CJoerg.Rau%40theta.co.nz%7Cccfe4ffdba7040554d4708db9eab3351%7Cd1af847b2ce144cbbb50d5802bb43c8b%7C0%7C0%7C638278230357179941%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=aB%2FnstwpnSHcMS0XQHO%2FFG1qVKcY0yt7EWmkNGQaHpc%3D&reserved=0

From: Jonas Rapp @.**@.>> Sent: Wednesday, August 16, 2023 7:39 PM To: rappen/FetchXMLBuilder @.**@.>> Cc: Robb Fergus @.**@.>>; Author @.**@.>> Subject: Re: [rappen/FetchXMLBuilder] Error from FetchXML Builder (Issue #956)

You don't often get email from @.**@.>. Learn why this is importanthttps://aka.ms/LearnAboutSenderIdentification

It seems that the returned PagingCookie is not a valid XML. Is the virtual table a part of Dual Write? Or did you create this virtual manually? I'm testing with some "standard" virtual tables, but no problem there...

- Reply to this email directly, view it on GitHubhttps://github.com/rappen/FetchXMLBuilder/issues/956#issuecomment-1680114554, or unsubscribehttps://github.com/notifications/unsubscribe-auth/APSQTL5XKKHD2IK74H55DNLXVR2IRANCNFSM6AAAAAA3R23KY4. You are receiving this because you authored the thread.Message ID: @.**@.>>


This information is intended for the addressee only. It may contain confidential and legally privileged information. If you are not the intended recipient, please reply to advise the sender and do not disclose, copy or redistribute this document or any information contained herein.

Please consider the environment before printing this email.

rappen commented 1 year ago

Probably fixed this in this commit: https://github.com/rappen/FetchXMLBuilder/commit/0d107f45a53f4e2e5b96fee19580a39ed0eab6ce More forgiving to non-working-XMLs.

rappen commented 1 year ago

Thanks for more details @robbfergus! That helps me to improve FXB! 😊