Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 79901

fetch xml - nested filter based on results from previous fetch

$
0
0

Hi,
I'm trying to  do a fetch on some conditions of type and, one of this is that the id of the entity is equal to one in a group I retrieved from a previous fetch, so it's an or nested in an and, like this:

<fetch ...><entity name="aaa"><attribute name="bbb"/>
        ....<filter type="and"><condition attribute="type" value="1" operator="eq"/>
            ...<filter type="or"><condition attribute="id" operator="eq" value="prev-result-1"/><condition attribute="id" operator="eq" value="prev-result-2"/>
                ...</filter></filter></entity></fetch>

However, this doens't work. If I remove the or filter the fetch retrieves some records, but, when I include it, the fetch retrieves nothing while it should find one entry. Unfortunately, the only case on which I can test retrieves only one record from the previous fetch, could it be that the or is not working because it is on a single condition or is it something else?

Thanks

Viewing all articles
Browse latest Browse all 79901

Trending Articles