Quantcast
Channel: CRM Development forum
Viewing all articles
Browse latest Browse all 9244

Display of 'ISV-code error' instead of custom message from PlugIn on PreStep

$
0
0

I developed a PlugIn which runs on the PreOperation of the update- as well as the create-step and validates the information entered by the user. If this validation fails, the user has to be notified and the update- or create-Operation needs to be aborted.

The display of my error messages is working fine on my Dev-Environment (CRM 2011 UR 13), but on one of our Test-Servers (CRM 2011 UR 11) the only message displayed to any user is: "Business Process Error: ISV code aborted the operation."

I use the following try-catch block and codeline to throw an exception:

try { Bool valid = false; if (!valid) { throw new InvalidPluginExecutionException(OperationStatus.Failed, "Invalid information message"); } } catch (InvalidPluginExecutionException e) { throw e; } catch (Exception ex) { string generalException = ex.Message + "\n\n" + ex.StackTrace; if (ex.InnerException != null) { generalException += "\n\nInnerException:\n" + ex.InnerException.Message + "\n\n" + ex.InnerException.StackTrace; }

}


I am well aware of the fact, that this issue might be solved by installing the latest UR - but as this is not an option on a few systems, I am desperately looking for a workaround.

Any help would be greatly appreciated.


Viewing all articles
Browse latest Browse all 9244

Trending Articles