FetchXML: get count of records based on a field of a linked entity
I have a scenario where i want to get the count of people from an Entity who have multiple location address marked as current address in other linked entity. <fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="true" aggregate="true"> <entity name="client"> <attribute name="clientid"/> <attribute name="name"/> <attribute name="createdon"/> <order attribute="name" descending="false"/> <link-entity name="locationadd" from="clientid" to="clientid" alias="aa"> <attribute name="locationadd" aggregate="countcolumn" /> <filter type="and"> <condition attribute=