I have a modified CRM 4 application that uses cases as the main enitity. In the application we have a number of teams setup and a number of queues that correspond to each team. I have written a plugin that restricts the queues a user can see depending on whether or not they are a member of the corresponding team (on the retrievemultiple event of queue)
What I would like to know is if it is possible to restrict the views a user has access to when they navigate to the main cases page. I would like to hide the default public view for every user, and for there only to be a set number of views available that correspond to the team that the user belongs to.
Yes, you can register a plugin for the RetrieveMultiple message on the savedquery entity. Then you'll have the QueryExpression used to retrieve the views. Just check that it's for the entity you're trying to filter, then add a few conditions to the query based on what you'd like to hide from the end user (savedquery.name != "View to Hide" or whatever).