I have written plugin on savedquery to restrict system views, it works on dynamics crm main app but does not work on customer service hub app.
Plugin does not fire on customer servvice hub app.
Please suggest.
I am running into the same issue. I have a plugin that I want to use to modify a specific filter in from a view. I am using version 9+ online. In the custom system (web based), the plugin gets fires on the RetrieveMultiple message for each of my views, but in the Sales Hub the plugin will not fire for the view with the filter I want to change.
Any updates on this. Thanks!
Hi Rohit,
I am facing same issue. It is not working in unified service hub app. I just created support ticket in Microsoft. I will let you know once I get answer.
Thanks,
Keyur shah.
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.
Hi partner,
Plugins are not affected by using main app or unified Interface(like Customer Service hub) because plugins are used to do some data interaction in the background, for example, we added a plugin when saving account, whether you are using main app or unified interface, the plug-in will be trigged.
Could you share more information about your plug-in? What is the main entity and how did you set it? By the way, could you kindly explain what exactly does "savedquery" mean?
Best Regards,
Leo
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 290,902 Super User 2024 Season 2
Martin Dráb 229,297 Most Valuable Professional
nmaenpaa 101,156