XrmDefinitelyTyped icon indicating copy to clipboard operation
XrmDefinitelyTyped copied to clipboard

Filtering through expand entity properties using RetrieveMultiple request

Open sowka1995 opened this issue 6 years ago • 3 comments

Is your feature request related to a problem? Please describe. Sometimes I need to make a query in which I have to filter on the properties of the associated entity, e.g. Select all annotations that are assigned to a specific quote. Currently, I can filter only on the properties of the main entity.

Describe the solution you'd like The effect I would like to achieve is something like this

 XrmQuery
        .retrieveMultiple(x => x.annotations)
        .select(x => [x.subject, x.notetext, x.filename, x.annotationid])
        .expand(x => x.objectid_quote, x => [x.quoteid])
        .filter(x => Filter.equals(x.quoteid, quoteId))
        .promise()

sowka1995 avatar Dec 23 '19 09:12 sowka1995

You add the filter on the expand, as a third parameter, if I'm not mistaken

magesoe avatar Dec 23 '19 10:12 magesoe

I'm tried but it not works, because Expand function for retrieveMultiple contains only 2 parameters, but expand for retrieve (single) contains third parameter

sowka1995 avatar Dec 23 '19 10:12 sowka1995