Skip to main content

Posts

Showing posts from April, 2016

Crm Service Impersonation: Shared Views Management

  Here is a note about an interesting project involving crm service impersonation . Client had an idea to allow users subscribe to the only views they need and unsubscribe from extra views freely.    Only view owner can share its views. The main issue here to give to user ability to share somebody’s views as the view owner without extending his security privileges.   The project had a number of custom controls and entities. Here I’m going to describe only the security workaround by using a service impersonation. Here is a “how to”, a very good example of service impersonation:    The plugin can be registered on “Calling User”. The minimum permission your customers will need is “Read Access” to “UserQuery” entity. All OOB roles have it.   First step : Get view owner .   Given you have a User Query id. I'm getting it from one of custom entities. //get query owner Entity userQuery = service.Retrieve( "userquery" , userQueryId, new ColumnSet ( new s