Tuesday, January 8, 2013

Hide Entity from Advanced Find in MS CRM 2011

Hide Entity from Advanced Find

As you know You should be able to handle this through security role, don't provide read permission on that entity to particular user, and it will be hidden for him.
But if you have read privilege on the entity and still you want that entity not to be shown in Advanced find then there is no supported way.

But there is an unsupported way to achieve the same. CRM exposes below Boolean property in EntityMetadata to identify which entity should appear in Advanced Find.

EntityMetadata.IsValidForAdvancedFind Property - Gets or sets whether the entity is will be shown in Advanced Find.
AttributeMetadata.IsValidForAdvancedFind Property - Gets or sets the property that determines whether the attribute appears in Advanced Find.

Try below query to hide Account entity from Advanced Find.

update MetadataSchema.Entity set IsValidForAdvancedFind = 0 where Name = 'account'

update MetadataSchema.Relationship set IsValidForAdvancedFind = 0
where ReferencingEntityId = (select MetadataSchema.Entity.EntityId from MetadataSchema.Entity where Name = 'account')
and IsValidForAdvancedFind  = 1

Reset IIS and clear server(and client) cache.

This will hide the entity for all users on the Advanced Find.


Radu C said...

I was wondering if i could hide advanced search based on user's roles. Like, if a user logs in, he/she can see advanced search but if another user, with a different role logs in, advanced search will not be visible

Will said...

I woudlnt suggest doing this. HArd to advise without knowing the reason behind it. One common worry with some users is that they can export all data but you can remove that providledge at the security role level.

I wouldnt recommend any of the below but you could look at:

by default all users have user level access to advanced finds. You could remove this permission by updating the database directly; alternatively you could manipulate to show/hide the Advanced find button from the ribbon using security roles memberships.

Unknown said...

Keep up the fantastic piece of work, I read few blog posts on this web site and I believe that your site is real interesting and has lots of great information. ERP Software in Mumbai || System Software || CRM Software in Mumbai || MLM Software

debleena said...

Hi Chandan,
I am new to CRM . I am using crm 4.0 VERSION. I am facing an issue. I t would be great if you could help me with this. My advanced find view is not getting shared .
After saving the view I have created, when I press the add user or team button and I select a particular user/team and select ok button ,then nothing happens. It just shows fetching the sharing information and nothing shows up. On pressing the cancel button,it takes me to send a error report. Can you help me with this?

Unknown said...

Life is full of many challenges. Challenges that will make you or break you depending on how you handle it. Visit my site for more updates. God Bless to your site.



Unknown said...

Thanks for sharing the best information....

Online Accounting Software | Cloud Accounting Software