I am creating CRM 2011 Fetch-xml Report and want to get those contact whose activity has been change or created in last 24 hours. how can I do that.
Start by retrieving all contacts, then inner join onto activities, then add a condition to only get those activities modified in the last 24 hours.
<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="true">
<entity name="contact">
<attribute name="fullname" />
<attribute name="telephone1" />
<attribute name="contactid" />
<order attribute="fullname" descending="false" />
<link-entity name="activitypointer" from="regardingobjectid" to="contactid" alias="ac">
<filter type="and">
<condition attribute="modifiedon" operator="last-x-hours" value="24" />
</filter>
</link-entity>
</entity>
</fetch>