Skip to content

Parallel Link-Entity does not work correctly in fetch-xml-retrieve #270

@AnyTick

Description

@AnyTick

You can add this test (into TestFetchXmlToQueryExpression) to check:

    [Fact]
    public void TestFetchXmlParallelLinkEntity()
    {
        using (var context = new Xrm(orgAdminUIService))
        {
            var fetchXml =
                @"<fetch>
                    <entity name='opportunity'>
                        <link-entity name='account' from='accountid' to='customerid'>
                        </link-entity>
                    </entity>
                </fetch>";
            var result = orgAdminUIService.RetrieveMultiple(new FetchExpression(fetchXml));
            Assert.Equal(2, result.Entities.Count);

            fetchXml =
                @"<fetch>
                    <entity name='opportunity'>
                        <link-entity name='contact' from='contactid' to='customerid'>
                        </link-entity>
                    </entity>
                </fetch>";
            result = orgAdminUIService.RetrieveMultiple(new FetchExpression(fetchXml));
            Assert.Empty(result.Entities);

            fetchXml =
                @"<fetch>
                    <entity name='opportunity'>
                        <link-entity name='account' from='accountid' to='customerid'>
                        </link-entity>
                        <link-entity name='contact' from='contactid' to='customerid'>
                        </link-entity>
                    </entity>
                </fetch>";
            result = orgAdminUIService.RetrieveMultiple(new FetchExpression(fetchXml));
            Assert.Empty(result.Entities);
        }
    }

It cann't be a result in this case.
Assert.Empty(result.Entities);

It's possible anybody can fix it?
Greeting
AnyTick

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions