Beringer Associates Technology Blog

Microsoft Dynamics CRM – Deactivate views in a solution

Posted by on in Microsoft CRM for Distribution, Microsoft Dynamics CRM

One cool feature in Microsoft Dynamics CRM is the ability to filter your data by the use of Views. This allows your end users to focus only on the data they need to see in a given day. You can also customize and create new views to filter the data as needed. For instance, you can create views of Activities due by Owner or Accounts owned within your teams territory. Microsoft also comes with many views pre-built for you:

 

AccountsOOBViews

 

 

While these views are great to have, some organizations don’t find a need for all of the pre-built views. To reduce confusion to their end users, we will receive requests to remove them from the view list. This can help those organizations during new end user adoption and helps ensure that each Rep is looking at the correct data.

 

If you are wanting to hide managed public System Views, you cannot delete them, but you can deactivate views in a solution! If you will be deploying your solution in a multi-tenant environment or for multiple customers, know that the view status is not contained within a solution. This means that the Views in each org you deploy your solution to will remain Active until you Deactivate them by some other means. If you are one person managing the views, you can keep a list of the deactivated views and then manually deactivate them in each org with your solution. If you have a team performing these tasks, it can be challenging to track which views have been deactivated. In addition, if you have tens of hundreds of orgs to deploy your solution to, this will be time consuming!  So, is there a better way? Fortunately, the MS CRM SDK allows us to programmatically query views and deactivate views.  Recently, I came across this code and built a simple app to do just what I needed. The app queries all deactivated views in the Dev environment and will loop through each of the Production environments to deactivate the same views.  Here’s a sample of what the deactivation code looks like:

 

DeactivateViewProgrammatically

 

Beringer Associates is always here to support your CRM technology questions and issues. Please contact us with any questions you may have.