Friday, May 30, 2008

Private Views no longer exist in CRM 4.0/Hiding System Views in CRM 4.0

A simple customization that I would do for clients was remove some of the system views that come out of the box but aren't used. You used to be able to accomplish this by creating a team and then sharing a Public View with that team. Sharing of System Views is no longer available. You can have this functionality with views created in Advanced Find, just share the view with a team or individual users. But not the System Views.

The only ways that I've seen to get around this are to either modify the EntityXML or update SQL. Either way you update the IsPrivate attribute from 0 to 1. If you do this in the EntityXML you will make the change and then upload the XML. If you do it through the database then the change will occur as soon as you update the database...or so I'm told. Please remember that UPDATES to the CRM databases are NOT SUPPORTED. If you go this route you are on your own and Microsoft will wipe their hands clean of you and your system. So, please, do yourself a favor and backup your databases before you attempt anything like this, and do this in a development environment first, not on a live server!

Here's the SQL script that I've used:

update SavedQuery
set IsPrivate = 1
where SavedQueryId = '00000000-0000-0000-00AA-000010001002'
--replace the SavedQueryId with the ID of the SavedQuery to be hidden

Once you make this change the views will drop from site completely. Meaning you won't even see them in the Customizations of the Entity area. That's because they've been marked as being private but no rights were given to anyone to be able to see that private view so it completely "disappears."

If anyone else has any other solution for this issue, I'd love to hear it. Typically I have clients who don't want to see the "Accounts with no Orders in the Last 6 months" and creating new views is not a problem.

Good luck out there!

David Fronk
Dynamic Methods Inc.

2 comments:

BK said...

Hi,
I don't know if you have already found a solution but for the others that come to your blog.

You can check this url: Hidings views in CRM 4.0 Using Plug-in.

http://msdynamicscrm-e.blogspot.com/2008/02/hiding-view-in-crm-40-using-plug-in.html

Hope that can help someone.

Dynamic Methods said...

Benoit,

Thanks for the comment. The post at msyndmiscrm-e.blogspot.com is actually very good and a great way of using plugins to keep things supported for future upgrades. Darren (author of msdynamicscrm-e.blogspot.com) has posted all the code for you, so all you have to do is implement it. I personally haven't tested it but I highly recommend the solution path.

Thanks again Benoit.

David Fronk
Dynamic Methods Inc.

Post a Comment