ISV code aborted the operation.

When writing a Microsoft Dynamics CRM plugin, you might come across the dreaded “ISV code aborted the operation” (isvaborted) error – code -2147220891 or 80040265.
In my experience this means the plugin is calling itself. For example, if your plugin fires on change of estimatedvalue on Opportunity, and your plugin updates estimatedvalue, you’re going to get an infinite loop.
Nip it in the bud with this simple line:
[code lang=”Csharp”]
if (context.Depth > 1) {
trace.Trace("Plugin has called itself. Exiting.");


Popular posts from this blog

Custom Lookup For Flows to Avoid "Disjunctions Not Supported"

Update Knowledge Articles in Bulk

A Pattern for Apex Test Code So You Can Forget About Required Fields