How can I create a fetchXML query which will retrieve only the top row from a linked-entity?
I have a situation in which I want a report which shows cases and the last action carried out on a case, ie in SQL it would be something like;
SELECT stuff FROM cases
LEFT JOIN (SELECT TOP 1 morestuff FROM casehistories ON ...)
I've found the count property in FetchXML but it seems to be ignored in linked entities, so the report gets multiple duplicate rows. How can I get just one row?