For the latest updates to this post please visit the original posting here: Filter Your CRM 2011 System Views Dynamically

Is your view list overflowing? Is it difficult to find the views that are meaningful for you? Do you wish you could filter your CRM 2011 system views dynamically?

First of all, let’s go through the out of the box configuration options in CRM 2011 that will help most of the cases:

If the above hints are not enough—for example, if you need to hide certain views dynamically based on business rules or security roles—you will need a custom plugin.

For example, your Opportunity view list might look like following:

Too many CRM 2011 System Views

But if you have a clear separation between the department handling New Opportunities and the department handling Renewals, the other department’s views are nothing but distraction. We really want to check for the membership in a security role, team or business unit and dynamically show/hide views that are meaningful.

We can achieve this by using the RetrieveMultiple plugin against savedquery, registered on the pre-operation step. The idea of the plugin is that we attach additional criteria to the existing query. The easiest way to filter the views is by referencing something in the description. For example, our plugin filters to views that have ‘Renewal’ in the description:

Viola! CRM 2011 System Views for Renewals Only!

Additionally, we could have a similar plugin in RetrieveMultiple for savedquery in the post-operation step, to dynamically set the default view. However, we do not recommend this as it would override the functionality from out of the box user level default views and pinned views.

Note that the idea spans from our CRM 4.0 blog Dynamic System Views in Microsoft CRM 4.0.

However, the plugin did need several changes in order to work and be optimized for CRM 2011.

Hope you have fun things planned for the holidays, and happy CRM’ing!

The post Filter Your CRM 2011 System Views Dynamically appeared first on PowerObjects.