I have a plugin for filtering Views based on security roles or teams. It works on CRM classic ui but does not work on UCI only in advance find can see the filtering result.
I have set Tracing at the start of the plugin and found the UCI can not trigger the plugin at the beginning of the plugin.
I referenced some articles dealing with this issue,
e.g.
community.dynamics.com/.../retrievemultiple-not-trigger-on-account-view-but-trigger-on-advance-find
and
stackoverflow.com/.../is-it-possible-to-filter-savedqueries-using-plugins-in-uci
I check the QueryExpression and FetchExpression like below
if(context.InputParameters["Query"] is QueryExpression)
{
//Logic to update Query Expression
}
else if (context.InputParameters["Query"] is FetchExpression)
{
//Logic to update Fetch Expression
}
All the above solutions didn't solve the problem of RetrieveMultiple SavedQuery plugin's TRIGGER. Because before checking QueryExpression and FetchExpression, I cannot trace the event triggered from UCI.
Any solution and suggestion are welcome and much appreciated.