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

Error when using filter by link-entity with alias #558

Closed
rappen opened this issue Oct 7, 2024 · 0 comments · Fixed by #560
Closed

Error when using filter by link-entity with alias #558

rappen opened this issue Oct 7, 2024 · 0 comments · Fixed by #560

Comments

@rappen
Copy link

rappen commented Oct 7, 2024

Query in FXB:

<fetch>
  <entity name='account'>
    <attribute name='name' />
    <filter>
      <condition attribute='statecode' operator='eq' value='0' />
      <link-entity name='contact' from='parentcustomerid' to='accountid' link-type='any' alias='PC'>
        <filter>
          <condition attribute='statuscode' operator='eq' value='1' />
        </filter>
      </link-entity>
    </filter>
  </entity>
</fetch>

Sending it to SQL 4 CDS.
See error below.

Maybe that is just unnecessary, maybe I shouldn't care about that.


System.ServiceModel.FaultException:
Unknown table PC
FetchXML Builder
- MarkMpn.Sql4Cds.XTB.SharedMetadataCache.get_Item(String name)
- MarkMpn.Sql4Cds.Engine.FetchXml2Sql.GetCondition(IOrganizationService org, IAttributeMetadataCache metadata, condition condition, String prefix, IDictionary`2 aliasToLogicalName, FetchXml2SqlOptions options, IDictionary`2 ctes, IDictionary`2 parameters, Boolean& requiresTimeZone, Boolean& usesToday)
- MarkMpn.Sql4Cds.Engine.FetchXml2Sql.GetFilter(IOrganizationService org, IAttributeMetadataCache metadata, filter filter, String prefix, IDictionary`2 aliasToLogicalName, FetchXml2SqlOptions options, IDictionary`2 ctes, IDictionary`2 parameters, Boolean& requiresTimeZone, Boolean& usesToday)
- MarkMpn.Sql4Cds.Engine.FetchXml2Sql.GetFilter(IOrganizationService org, IAttributeMetadataCache metadata, Object[] items, String prefix, IDictionary`2 aliasToLogicalName, FetchXml2SqlOptions options, IDictionary`2 ctes, IDictionary`2 parameters, Boolean& requiresTimeZone, Boolean& usesToday)
- MarkMpn.Sql4Cds.Engine.FetchXml2Sql.BuildJoins(IOrganizationService org, IAttributeMetadataCache metadata, TableReference dataSource, NamedTableReference parentTable, Object[] items, QuerySpecification query, IDictionary`2 aliasToLogicalName, Boolean archive, Boolean nolock, FetchXml2SqlOptions options, IDictionary`2 ctes, IDictionary`2 parameters, Boolean& requiresTimeZone, Boolean& usesToday, BooleanExpression& where)
- MarkMpn.Sql4Cds.Engine.FetchXml2Sql.GetFilter(IOrganizationService org, IAttributeMetadataCache metadata, filter filter, String prefix, IDictionary`2 aliasToLogicalName, FetchXml2SqlOptions options, IDictionary`2 ctes, IDictionary`2 parameters, Boolean& requiresTimeZone, Boolean& usesToday)
- MarkMpn.Sql4Cds.Engine.FetchXml2Sql.GetFilter(IOrganizationService org, IAttributeMetadataCache metadata, Object[] items, String prefix, IDictionary`2 aliasToLogicalName, FetchXml2SqlOptions options, IDictionary`2 ctes, IDictionary`2 parameters, Boolean& requiresTimeZone, Boolean& usesToday)
- MarkMpn.Sql4Cds.Engine.FetchXml2Sql.Convert(IOrganizationService org, IAttributeMetadataCache metadata, FetchType fetch, FetchXml2SqlOptions options, IDictionary`2& parameterValues)
- MarkMpn.Sql4Cds.XTB.PluginControl.OnIncomingMessage(MessageBusEventArgs message)
- XrmToolBox.New.PluginForm.SendIncomingBrokerMessage(MessageBusEventArgs message)
- XrmToolBox.New.NewForm.MainForm_MessageBroker(Object sender, MessageBusEventArgs message)
- Rappen.XTB.FetchXmlBuilder.FetchXmlBuilder.SendingToTool(String tool)

  • XrmToolBox Version: 1.2024.9.69
  • FetchXML Builder Version: 1.2024.10.1
  • DB Version: 9.2.24091.196
  • Deployment: Online
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

Successfully merging a pull request may close this issue.

1 participant