Sunday 31 August 2008

Hiding System Views in CRM 4.0

In CRM 3.0 it was relatively easy to hide one of the built-in system views - all you had to do was share the view with an empty team, which converted the view to a userquery entity. However, CRM 4.0 does not support this.


There is an alternative route, but it required plug-in coding. Rather than have to write code for each deployment, I created a standard plug-in that can be used to hide any views, based on some XML configuration. The source code and compiled code is available on the MSDN Code Gallery, along with a sample configuration file.

9 comments:

Saritha said...

Hi,
I am very new to plugin development/deployment on crm 4.0. Using PluginRegistration 2.1 tool, can you plaese tell me how to register this plugin to my dev environment?
Thanks,

Saritha said...

I found it! Digged into your source code to get all the info. Works well. Thank you very much.

Unknown said...

I registered the plug-in .dll using PluginRegistration 2.1 tool, but don't know how to import the xml file. Would you help?

David Jennaway said...

Ken

The xml data should be copied into the unsecure configuration text box in the top right of the form when registering the plugin step with the PluginRegistration tool

Unknown said...

What is 'Message' in 'General Configuration Information' when registering a step for the plugin?

Thanks!

Unknown said...

The view still shows in dropdown. When I select it, it says 'The logged-in user does not have the appropriate security permissions to view these records or perform the specific action'.

Can you help?

Sample configuration configurations,

Mark said...

Hi,

This exactly what I am looking for, thanks!

But unfortunately I can't get it to work. Could you provide some more information about the registration steps?

Thanks in advance!

Mark

Steve Foster said...

What should the message attribute be when creating a step??

Please provide a readme on how to install and use the plugin, as seems really useful tool.

Chris H said...

I also needed this and find the plugin very useful, but the docs are lacking so here's what I did.

- Create and compile the Plugin using the instructions in the CRM SDK.
- Register the Plugin DLL using the latest plugin reg tool
- Add a Step with these settings
-- Message: RetrieveMultiple
-- Primary Entity: savedquery

- In the Unsecure Configuration text field, copy/paste the sample XML included in the project.

To get the Entity OTC names, you need to do a SQL query of the SavedQueryBase table and look at the value in ReturnedTypeCode column. There may be an easier way than this, but that's how I found the OTC value.