Monthly Archives: May 2014

22May

CRM 2013 FetchXML Improvements

With CRM 2013, Microsoft added some awesome improvements to their FetchXML.  For those unfamiliar, FetchXML provides you an easy way to query information out of CRM.  With the CRM 2013 FetchXML improvements you can perform significantly more queries than ever before.   Today I want to show you my favorite new feature which is alias filters.

CRM 2013 FetchXML Improvements – Looking at an Example

Let’s say you wanted to find the number of active accounts without contacts.  With CRM 2013, this is now possible and super simple, here’s how.

To start, let’s query for all of our accounts:

Simple enough, and in my test scenario I get 15,179 records.

To be fair though, we are only looking at active accounts, so let’s add a filter.

This returns 14,589 active records.

Adding our Linked Entity and Alias Filter

Now comes the fun part, with 2013 we can also add to our filter, columns concerning our linked entity.

This returned 839 records.  That means in my CRM environment, I have 839 accounts that do not have any contacts associated.  In my case, I want to list those accounts and find which ones need to be deactivated and/or who from sales I should contact to make sure we get the proper contact information inside CRM.

At this point, the count tells us the number of companies we need to review, but really we want tangible data.  Let’s modify this query to get something we can have someone analyze.

Here I’ve added the telephone and composite address (which pulls line 1, city, state, and zip).  I’ve also limited this to 10 records in case your environment has way more than 800.  The primarycontactid should not return, but I’ve included so you can verify.

 

Looking at our Fetch filter, you may notice a new attribute called entityname.  For some of you, this is pretty exciting and ideas are churning through your head already.  If you’re like me, you have had to perform multiple queries to accomplish similar feats.  Luckily with CRM 2013 we can get to our desired data quicker and easier then ever before.

 

What are some more scenarios?

With the new alias filter option, you can look for:

  • Leads without tasks
  • Contacts without activities
  • Strategic contacts without activities for the last 6 months
  • Contacts for top tier accounts in one city combined with contacts for top tier & important accounts in another city

The last one may seem random, but the more you explore the alias filter the more you will be glad you did.

I hope you enjoy!

 

 

© Copyright 2012-2014, All Rights Reserved