Context’s InputParameters and InvalidPluginExecutionException


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.



Author: Nishant Rana

I love working in and sharing everything about Microsoft.NET technology !

Please share your thoughts

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.