rappen / FetchXMLBuilder

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

Converting to SQL Query, Power Automate Parameters, and OData all fail with "value cannot be null. Parameter name: source" #1069

Open rgbeach2112 opened 1 month ago

rgbeach2112 commented 1 month ago

Probably doing something stupid...but trying to convert FetchXML to SQL, OData, or Power Automate Parms all result in the same error (see below).

Looks like maybe expecting the "Dataverse long term data retention Data Source" parameter to have a value, as when I set it to the only available option "archive", it gets past the initial null value error only to get other errors e.g. "Only live data is supported in web api".

image image image
rappen commented 1 month ago

Sorry about that. Can you send the Fetch XML as well? If it's a bit too sensitive, can you email me about it?

rgbeach2112 commented 1 month ago

Hi....thanks for your help. As I said, I'm probably doing something wrong. Below is the FetchXML. It is a Dataverse view, and successfully executes and returns results in FextchXMLBuilder. Maybe it's a problem with the linked-entities?

<fetch version="1.0" output-format="xml-platform" mapping="logical" no-lock="false" distinct="true" userqueryid="74975aab-7074-ef11-a670-000d3a4f194f">

On Tue, Sep 17, 2024 at 2:08 AM Jonas Rapp @.***> wrote:

Sorry about that. Can you send the Fetch XML as well? If it's a bit too sensitive, can you email me about it?

— Reply to this email directly, view it on GitHub https://github.com/rappen/FetchXMLBuilder/issues/1069#issuecomment-2354718431, or unsubscribe https://github.com/notifications/unsubscribe-auth/BG2PIIHUDDAHNXTQ2JPOVR3ZW7IPNAVCNFSM6AAAAABOKGU4JKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNJUG4YTQNBTGE . You are receiving this because you authored the thread.Message ID: @.***>

rappen commented 1 month ago

I simplifying the issue a lot, with the same problem:

<fetch>
  <entity name='contact'>
    <attribute name='fullname' />
    <link-entity name='listmember' from='entityid' to='contactid' alias='MM' intersect='true'>
      <link-entity name='list' from='listid' to='listid' alias='ag'>
        <link-entity name='campaignitem' from='entityid' to='listid' intersect='true'>
          <link-entity name='campaign' from='campaignid' to='campaignid' alias='ah' />
        </link-entity>
      </link-entity>
    </link-entity>
  </entity>
</fetch>

I can make it work if I comment out all link-entity under the first one, AND make the link-entity outer. Adding anything more, it can't convert it.

<fetch>
  <entity name='contact'>
    <attribute name='fullname' />
    <link-entity name='listmember' from='entityid' to='contactid' link-type='outer' alias='MM' intersect='true'>
      <!--
<link-entity name='list' from='listid' to='listid' alias='ag'>
  <link-entity name='campaignitem' from='entityid' to='listid' intersect='true'>
    <link-entity name='campaign' from='campaignid' to='campaignid' alias='ah' />
  </link-entity>
</link-entity>
-->
    </link-entity>
  </entity>
</fetch>

Now my knowledge is ended, and I call a friend, my expert Mr. @MarkMpn ☎️

rgbeach2112 commented 1 month ago

Thank you for your help in looking into this - and for making such a great tool!

On Tue, Sep 17, 2024 at 10:54 AM Jonas Rapp @.***> wrote:

I simplifying the issue a lot, with the same problem:

I can make it work if I comment out all link-entity under the first one, AND make the link-entity outer. Adding anything more, it can't convert it.

Now my knowledge is ended, and I call a friend, my expert Mr. @MarkMpn https://github.com/MarkMpn ☎️

— Reply to this email directly, view it on GitHub https://github.com/rappen/FetchXMLBuilder/issues/1069#issuecomment-2356323719, or unsubscribe https://github.com/notifications/unsubscribe-auth/BG2PIIDRMPKVUXWURKHZ5HTZXBGBXAVCNFSM6AAAAABOKGU4JKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNJWGMZDGNZRHE . You are receiving this because you authored the thread.Message ID: @.***>