Email Smart matching–Undocumented behavior


If CRM has Email Smart matching enabled, then following is behavior is worth noting.

For incoming Email activity, if Case record is created out of it using “Convert to Case”, then any subsequent emails coming from same Sender having same Subject automatically gets associated with Case.

CRM–Shared Secured Field


Now in CRM you can share Secured Field with other Users or Team.

When a Entity has at least one secured field defined, a User get to see the option in Ribbon as “Share Secured Fields”



Clicking on Link opens a new Window where user can Add/Remove User/Team and grant permission to each individual on every secured field





Error: Your subscription has the maximum amount of storage available. To obtain additional storage, please contact our sales organization.


We received following error on CRM 2013 On-premise deployment.



From message it looks like this error is for CRM 2013 Online clients, where each subscription has storage limit and when this storage limit is approaching CRM Admin gets email so that they can pro-actively get more subscription space. However it does not make any sense for CRM On-premise.

This error basically comes when Database drive space is full and has not more space, so either we have to shrink the database or get more disk space.

CRM 2011 & CRM 2013–Usage Audit Report (On-Premise Deployment)

For On-Premise deployment of CRM 2011 or CRM 2013, I have written a SQL Query which will give details about who when accessed the CRM and what was his/her role in CRM
CRM does have a Audit Summary View which let you see this details but you cannot export this data from CRM Audit Summary entity neither can you have carts/graphs around that data in CRM Report.
Here is script, run it as db_owner on CRM Database. You can also write SQL Connection in Excel and pull this data dynamically.

SELECT Usage.*

,(SELECT SecRole.Name +‘,’FROM SystemUserRoles SysUser

INNERJOINRole SecRole ON SysUser.RoleId = SecRole.RoleId

INNERJOIN SystemUse SU ON SysUser.SystemUserId = SU.SystemUserId

WHERE SU.DomainName = Usage.UserName




SELECT U.fullname AS [FullName], U.DomainName AS [UserName]


,DATEPART(MM,DATEADD(HH,(DATEDIFF(HH,GetUTCDate(),GetDate())), A.CreatedOn))AS [Month]

,DATEPART(DD,DATEADD(HH,(DATEDIFF(HH,GetUTCDate(),GetDate())), A.CreatedOn))AS [Day]

,COUNT(*) [Counter]

,MIN(DATEADD(HH,(DATEDIFF(HH,GetUTCDate(),GetDate())), A.CreatedOn)) [FirstAccessAt]

,MAX(DATEADD(HH,(DATEDIFF(HH,GetUTCDate(),GetDate())), A.CreatedOn)) [LastAccessAt]


INNERJOIN SystemUser U ON A.objectid = U.Systemuserid

WHEREAction= 64


U.fullname, U.DomainName




) Usage

Hope you find this script handy.

CRM 2011–Generic Rollup Solution

Project Description

Many time we need to do the Rollup of certain child attribute data into parent attributes. For example number of Contacts for an Account or total order for order lines etc.

The best way to achieve this rollup is using CRM Plugins, however for each Rollup on each entity we have to write separate plugin which will take care of local attributes and type of aggregation required.

This Generic solution is meant to address this problem. It has generic code which works with configuration stored in CRM and can be applied to any entities.

This Generic Solution servers following purpose

1. It rollup data

2. Aggregation is done terms of Count, Average and Sum

3. A single Plugin Code is used for all the Entities.

4. Aggregation is completely configurable without any code change.

5. Aggregation changes in based on metadata.

How to configure Generic Rollup?

  1. Import the Managed Solution provided with this Project.
  2. If Settings does not reflect the entity link for “Rollup Configuration” entity, modify the customization to add the link to Settings (or any other Group).
  3. Create new record for “Rollup Configuration” entity
    1. At first enter the Child Entity Name and the type of aggregation and Save the Record (Do not close the Form)
    2. Once the record is saved under Rollup Config tab, enter the Configuration as follows
      1. Child Entity Entity Logical Name: this field will be auto populated based on what you have entered on main form.
      2. Child Entity Aggregate Attribute Name: This is the attribute from Child entity on which aggregation needs to be done. Note if aggregation type in Count then select the last items from this list which is PrimaryKey attribute name from Child Entity.
      3. Parent Entity Name (Lookup Attribute): This Dropdown contains all the Entities which has One-To-Many relationship with Child entity. Select Entity to which you want to update the aggregation results.
      4. Parent Entity Aggregation Attribute Name: This is attribute from Parent entity to update aggregation results.
    3. Hit Save once selection is completed and you are done !!!



What happens behind the scene?

Once you import the solution it also imports 3 plugin SDK Messages Processing steps, namely for Create, Update and Delete. These Plugin messages are configured to triggered on All the entities in CRM. Whenever the record is Created, Updated or Deleted this code checks whether rollup is configured for the entity. If yes it reads the configuration and calculates the aggregate values and updates it in Parent entity.


By default plugin will be triggered on all the entities irrespective of whether rollup is configured to entity, this can cause a performance problem. So in order to avoid Plugin triggering each entity, you can configured this messages separately for only those entities which need Rollup. This is extra admin steps that needs to be done, but it can give better performance.

Please try out the solution and let me know your feedback.


CRM Managed Solution is available on CodePlex

CRM 2011- System User–Team Roles View

In CRM2011, Team can be assigned with Security Roles. All the Team members be it from same Business Unit or different Business Unit, inherits this Security Roles. Hence a User will have two sets of Security Roles, one which is granted directly to User and other is which User inherits from Team which he/she is member of.

In System User Form, we get to see only those Security Roles which are directly assigned to User. Where as in order to see which Security Role a particular User is inheriting from Team, we have to open Teams and then check Roles assigned to Team.

This involves opening multiple forms, one for each Team. This solution give one view which will list all the Team Roles that User inherits.



  • Import the Managed Solution
  • Customize the System User to add Navigation link for web resource mkisv_/SystemUserTeamRoles.htm
  • Publish User entity



Following screenshot shows how the View look like (Note the Navigation Linke: Team Role)




Solution can be downloaded from CodePlex

CRM 2011–Utilities Developed by me

It started as small experiment to create a CRM 2011 add-on to address my project requirement. For my project had this requirement which needed to develop a utility which I developed using Silverlight, later on I realized that requirement that it was catering is kind of universal requirement and many other projects will need it, so I created it as Managed Solution and uploaded on CodePlex so that others can use it. That was my first ever CodePlex project for CRM 2011 ISV. Later on I kept on developing CRM 2011 managed solutions and made it available on CodePlex. Now when I look back ever since I started it in 04/2011 so far I have developed 10 Managed Solutions !!!

I received good response in terms of Page Visits and Downloads and probably that’s what kept me encouraging to develop new CRM 2011 Managed Solutions.

Special thanks to Tanguy for making available the wonderful CRM Connection Control, Free !!!

Following are Utilities / Add-On that I have developed so far and which are available on CodePlex for free download

# Name Description
1 CRM 2011 Silverlight Web Resource for User Settings Silverlight based Web Resource to managed User Settings
2 CRM 2011 – WinForm based User Settings Console Win Form based utility to managed User Settings. It also has added feature to check whether existing User is valid AD User.
3 CRM 2011 TreeView for Lookup Treeview form of Lookup data which has Parent Child relationship. For example Account – Parent Account
4 CRM 2011 TreeView for Dependent Picklist Treeview form for Dependent Picklist.
5 CRM 2011 Lookup Preview HTML Lookup preview on CRM Form where Lookup control is placed.
6 CRM 2011 Un-managed Solution Bulk Export Win Form based utility to do Bulk Export of CRM 2011 Un-managed solutions.
7 CRM 2011 AttributeMapping CRM 2011 Attribute Mapping for updating Lookup mapping field data.
8 CRM 2011 Bulk Disassociation of 1:N relationship records This Custom Ribbon allows User to do bulk disassociation of 1:N relationship records, which other wise has to do one by one. For example if Account has multiple Contacts and User wanted to disassociate them they can do it using this Add-On
9 CRM 2011 – Many-To-Many Relationship Entity View This N:N view facilitates to see records in single view.
10 CRM 2011 Global Quick Search Global Quick search allows User to carry our CRM’s OOB Quick Find on multiple entities and shows results in a single page.

CRM 2011: Many-to-Many (N:N) Relationship Entity View

Microsoft Dynamics CRM has many to many relationship which enables user to establish N:N relationship between 2 CRM entities. CRM creates intersect entity for each of this relationship.

Once established user can associate entities from each other and view it from each other’s form using Left Navigation link or Sub-Grid placed in form. However there is no Advance find available on these intersect entities and only way to see it from CRM Form. Association and dissociation can only be done from CRM form. Although this serves most of the purpose, there can be scenario where user wanted to see all the data that is available of intersect entity, for example Security Role and System User where we might wanted to see all the User in given security Roles.


In order over come this limitation I have created Silverlight Web Resource which will allow user to view all many-to-many related records from single page.

It has following components

1. Plug-in to generate XML (Data) Web Resource which gets saved in CRM Web Resource store. This plug-in is wired up with “Publish All” messages hence gets fired every time “Publish All” action is called.

2. Silverlight Web Resource, to enable selection of Intersect entity and do paging.


Once managed solution is imported, CRM Customizer needs to edit SiteMap and add link to mtm_/ManyToManyBulkEditTestPage.html at appropriate Group/Sub-Group


Managed Solution is available at



  • Following is how Silverlight page looks like


  • There are 3 options for relationship type selection


  • Once relationship type is selected from combo box, appropriate View names are populated in View list


  • Once the View is selected data is rendered from give view