Hi,
Thanks for the response :)
Same thing I was thinking that plugins should not be effected by the main app or unified Interface, but my plugin is not being triggering in the customer service hub but working fine in main app.
The main objective of plugin is to show/hide system views as per user role.
eg: Users having role X can see only system views A,B,C and Users having role Y can see only system views D,E,F.
So solve it I wrote below plugin:
var organizationServiceFactory = (IOrganizationServiceFactory)serviceProvider.GetService(typeof(IOrganizationServiceFactory));
var pluginContext = (IPluginExecutionContext)serviceProvider.GetService(typeof(IPluginExecutionContext));
var orgService = organizationServiceFactory.CreateOrganizationService(pluginContext.UserId);
if (pluginContext.PrimaryEntityName.Equals("savedquery") && pluginContext.InputParameters.ContainsKey("Query") && pluginContext.InputParameters["Query"] is QueryExpression)
{
var userRole = "dev";
var views= new List<string>() {"A","B","c" };
if(userRole == "dev"){
var hideViewCondition = new ConditionExpression("name", ConditionOperator.NotIn, views.ToList().Distinct().ToArray());
query.Criteria.AddCondition(hideViewCondition);
}
}
Find Below Step registered with plugin:

Please suggest.