Using the classic UI or advanced find, creating a plugin on RetrieveMultiple of savedquery and removing views from the OutputProperties will filter out the list of available views. However in UCI, I am not able to get this plugin to fire at all. There are no events showing in the plugin trace log. Is there a way to accomplish filtering the list of available views using plugins in UCI?
1
votes
1 Answers
-1
votes
Without seeing your code, I can guess the trick you are trying - raise InvalidPluginExecutionException
& see the plugin trace log is not in right place.
But the changes around RetrieveMultiple
message in UCI is intentional and by design, so the plugin may not behave the way we want.
Chances are that you are changing the QueryExpression, and the plugin is working fine in the classic UI but you will have challenges migrating to Unified Interface.
The reason is that in the Unified Interface Dynamics 365 uses FetchExpression, so you’ll need to handle both cases if you want to use both classic UI and Unified Interface.
Probably if you can check for below condition & do the manipulation the way you want. Read more
if(context.InputParameters["Query"] is QueryExpression)
{
//Logic to update Query Expression
}
else if (context.InputParameters["Query"] is FetchExpression)
{
//Logic to update Fetch Expression
}