Looking for PowerObjects? Don’t worry, you’re in the right place! We’ve been part of HCL for several years, and we’ve now taken the final step in our acquisition journey: moving our website to the HCL domain. Nothing else is changing – we are still fanatically focused on Microsoft Business Applications!

PowerObjects Blog 

for Microsoft Business Applications


Filter Your CRM 2011 System Views Dynamically

Post Author: Joe D365 |

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!

Joe CRM
By Joe D365
Joe D365 is a Microsoft Dynamics 365 superhero who runs on pure Dynamics adrenaline. As the face of PowerObjects, Joe D365’s mission is to reveal innovative ways to use Dynamics 365 and bring the application to more businesses and organizations around the world.

3 comments on “Filter Your CRM 2011 System Views Dynamically”

  1. Thanks for he tip! This is going to help in a big way. We have specific needs and enjoy the freedom of only seeing what views are important to us. It helps to keep a clean, productive environment and prevents confusion when used by new employees.

  2. Great tip! for anyone looking for some sample code here's an example of how to get into the RetrieveMultiple that Joe is talking about.
    QueryExpression query = (QueryExpression)context.InputParameters["Query"];
    EntityCollection collection = (EntityCollection)context.OutputParameters["EntityCollection"];

PowerObjects Recommends