XrmDefinitelyTyped
XrmDefinitelyTyped copied to clipboard
Filtering through expand entity properties using RetrieveMultiple request
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()
You add the filter on the expand, as a third parameter, if I'm not mistaken
I'm tried but it not works, because Expand function for retrieveMultiple contains only 2 parameters, but expand for retrieve (single) contains third parameter