Suppose you are writing a pre -event plugin in which you compare to
old and new values and on certain condition would like to cancel the Save or
Update and stop the execution, it was simple in CRM 3 with an Abort() method
while in CRM 4, you have to manually raise and throw a
Invalid-Plugin-Exception, while this gives a dirty error message on your MSCRM screen,
you can make it better by entering you own Message explaining why the record could
not be saved:
throw new InvalidPluginExecutionException("Execution has been stopped due to this reason");
Comments
I wonder if there are any way to do the same thing but without writing the entry caused by this in eventlog?
Thank you
- Just treat the operation as if it had already completed successfully, and let the plug-in take care of the rest. Design flaws like this fly in the face of the claims that Dynamics CRM is a one-for-all business platform.
Can we do the same thing without throwing an exception in CRM 4.0?
i don't want the user to see an exception.i just want to stop the action done (delete, save...).
thank you.
thank you for your prompt reply