Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
rgbeach2112 opened this issue Sep 16, 2024 · 5 comments

Comments

@rgbeach2112
Copy link

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
Copy link
Owner

rappen commented Sep 17, 2024

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
Copy link
Author

rgbeach2112 commented Sep 17, 2024 via email

@rappen
Copy link
Owner

rappen commented Sep 17, 2024

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
Copy link
Author

rgbeach2112 commented Sep 17, 2024 via email

@MarkMpn
Copy link
Collaborator

MarkMpn commented Nov 25, 2024

I believe the OData & therefore the Power Automate conversion is fixed in MarkMpn/MarkMpn.FetchXmlToWebAPI#6 if you want to pull the latest version of this submodule @rappen. The SQL conversion works already if you enable the SQL 4 CDS option - I haven't investigated the source of this error in the built-in conversion but is likely a missing null check on the link-entity items.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants