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.
Asked
Active
Viewed 902 times
0
-
You should provide examples you have attempted at least or the specific parts of a fetch statement you don't understand! – Richard Dewhirst Feb 07 '14 at 10:32
1 Answers
2
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>

Guido Preite
- 14,905
- 4
- 36
- 65

James Wood
- 17,286
- 4
- 46
- 89