I have a custom plugin which is registered on After Operation Update on SetState and SetStateDynamicEntity but for some reason the plugin is not getting fired not sure what am I missing.
Here is the code that I have so far.
if(this.PluginExecutionContext.InputParameters.Contains("EntityMoniker"))
{
// Work with the Moniker
vartargetEntity
= (EntityReference)this.PluginExecutionContext.InputParameters["EntityMoniker"];
thrownewInvalidPluginExecutionException(this.PluginExecutionContext.MessageName);
}