Microsoft Dynamics CRM 2015: Finding Inactive Accounts

By - October 18, 2016

One of our CRM 2015 Service Pack 1 clients has recently begun to clean their data by merging duplicate account records. During this process they realized that the entries under the Posts area of the Activity Feed for the accounts was not being merged to the new account. RSM created a Plug-in to merge the posts for accounts that will be merged in the future. Unfortunately this client does not have scribe and we are not able to run this program retroactively on merged accounts. The question became: how many of the already merged accounts (of which there are over 1000 records) have posts that we want to move to the master record?

The logical first step was to use the built -in advanced find functionality to find manually created posts for inactive accounts. Unfortunately for anyone who has found themselves in this position, the built-in advanced find does not allow users to add the regarding object to the posts’ advanced find, nor posts to the account advanced find.

I was able to query the database directly by writing FetchXML (copied below) to find the answer to our question (which turned out to be a little over 300). Using this code we can easily create an SSRS report displaying a list that will only display the accounts which need to be reactivated and re-merged, allowing the custom plugin to merge the posts. The report will save the client from wasting time searching for inactive accounts that have posts that need to be merged to the master record.

With a little tweaking to this code, you could search for active accounts that have not had a new post created within the past 6 months or the last year. This would return a list of accounts that have not had any recorded activity in the time frame selected. These accounts should be targeted to make sure your organization stays involved with your accounts.

For more information about how to get the most value from your Microsoft Dynamics CRM solution, contact our experts at 855-437-7202

 

Steven Trefz

RSM

 

<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="true">
<entity name="account">
   <attribute name="name" />
   <order attribute="name" descending="false" />
                <filter type="and">
     <condition attribute="statecode" operator="eq" value="1" />
   </filter>
                <link-entity name="post" from="regardingobjectid" to="accountid" link-type="inner" alias="Posts" >
                   <attribute name="source" />
                                <filter type="and">
                                                <condition attribute="source" operator="eq" value="2" />
                                </filter>
                </link-entity>
</entity>
</fetch>

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

Receive Posts by Email

Subscribe to the Microsoft Dynamics categories and receive notifications of new posts by email.
  • This field is for validation purposes and should be left unchanged.