Skip to content

Getting all records when using Fetch on N:N relationship on Query-Get Results #24

@eccountable

Description

@eccountable

We created a custom table with N:N relation on an OOTB table (Work Order Service Task).
We wrote and tested a FetchXML query (in FetchXML builder) using the custom table first and linked to the OOTB table. It returns the one related record, when the fetch condition uses "eq" and the value is the GUID of the OOTB table.
We created a workflow on the OOTB table calling Query-Get Results, and the Fetch condition (linked back to the OOTB table) was updated to use "not-null" (as we would when using the N:1 example from the documentation).
<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='true'> <entity name='xxx_servicecode'> <attribute name='xxx_servicecodeid' /> <attribute name='xxx_description' /> <link-entity name='xxx_xxx_servicecode_msdyn_workorderservicet' from='xxx_servicecodeid' to='xxx_servicecodeid' link-type='inner' alias='sc' intersect='true'> <filter> <condition attribute='msdyn_workorderservicetaskid' operator='not-null' /> </filter> </link-entity> </entity> </fetch>

The result is that the query returns all related records, so it looks like the there is a problem with the parsing that replaces the "not-null" with the "eq...value".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions