How can i find all accounts who has not modified any activity in last one month using FetchXMl RRS feed

  • Question

  • Is it possible to find all accounts who has not modified any activity in last one month in CRM. I have tried one but i am not sure whether it is correct or not. can anybody please help me. I am not sure whether it is possible or not.

    <fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="true">
    <entity name="account">
    <attribute name="name" />
    <attribute name="primarycontactid" />
    <attribute name="telephone1" />
    <attribute name="accountid" />
    <order attribute="name" descending="false" />
    <link-entity name="activitypointer" from="regardingobjectid" to="accountid" alias="au" link-type="outer">
    <filter type="and"> <condition attribute="modifiedon" operator="olderthan-x-months" value="1" /> </filter> </link-entity>

    • Edited by Kartik35 Thursday, December 19, 2013 2:28 PM
    Thursday, December 19, 2013 2:19 PM

All replies

  • Hi Kartik,

    It think your fetch xml query is correct one. 

    Try creating an advanced find query and test it over there through UI that will help.


    Shraddha Dhingra


    Thursday, December 19, 2013 4:05 PM
  • Hello,

    I'm afraid that it is not possible to get such kind of fetch xml. You will have to implement your logic in 2 steps:

    1. Retrieve all accounts.

    2. Remove all the accounts that has activities that have activities that were modified during last month.

    Dynamics CRM MVP/ Technical Evangelist at SlickData LLC
    My blog

    Thursday, December 19, 2013 4:47 PM