Wednesday, February 3, 2010

Private Views in CRM 4.0

I found myself in an odd predicament recently; I had made the Active Accounts system view private in CRM 3.0, and when we upgraded to CRM 4.0 the view stayed Private. The issue reared its ugly head when I ran headstrong into a situation in which I needed to make that system view Public again... well, to my surprise there was no ability to make a Private view Public or vice versa.

You see, in CRM 3.0 there used to be the ability to make a system view Private, thereby making it hidden from some or all users... this functionality has been deprecated in CRM 4.0... But never fear, there is an answer... There are two ways to accomplish this in CRM 4.0, the first is support and the second is not.

  1. The first method is to modify the EntityXML and set the IsPrivate attribute to 1 (to make it Private). Once you update the XML and upload and publish it to CRM you will have made the system view private.


  2. The second method is not for the faint at heart and is not supported as you would have to update the database directly… so remember that modifying or updating the CRM database is NOT SUPPORT and you can void your support contract if you do it. If you decide to proceed on this route do so at your own risk and against my recommendations. If you decide to press on, be sure to have a good backup of the database and test this in your dev environment first. What you need to do is to set the IsPrivate attribute to a 1, but will be doing it via a SQL script. Remember, Microsoft will not support you if something goes wrong… so be sure you understand the risk and know that you are on your own!

So, if you insist on moving forward (and I’m not saying you should), here’s the script (theoretically speaking that is ;) to change the Active Accounts system view to Private:

Update SavedQueryBase
Set IsPrivate = 1
Where SavedQueryId='00000000-0000-0000-00AA-000010001002'
You can replace the GUID above with that of any system view to accomplish the same thing.

Awesome Accessories I Use

News about Shahin

iPad Accessories

Free Web Hosting

Web hosting

Emruz's Fan Box

Emruz on Facebook

Followers

Emruz. Powered by Blogger.