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>
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top