Hi,
This is something peculiar i found while throwing the InvalidPluginExecutionException for a pre-update plugin.
In our plugin as usual we will first convert the Target InputParameter property to DynamicEntity,
DynamicEntity entity = (DynamicEntity)context.InputParameters.Properties["Target"];
Ideally for a pre-update event, the inputparameters should contain only those attributes whose values have been modified.
For e.g. if i change the value for Salutation and FirstName field in the Contact form, i will get the following attributes in the InputParameter.
However if we throw InvalidPluginExecutionException and try to save the form again, we would receive almost all the attributes passed into inputparameters property bag.
This is something we should be aware of while using InvalidPluginExectuionException.
Bye..
Discover more from Nishant Rana's Weblog
Subscribe to get the latest posts sent to your email.
