Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

InvalidPluginExecutionException no longer returning a "nice" user message in CRM 365 9.1.0.2842 when resolving cases (incident entity)

Posted on by 210

A customer has a few validators they wanted to use to check various conditions when resolving incidents. These validations are handled by a plugin, which simply throws an InvalidPluginExecutionException exception with the appropriate message. This USED to simply show this message on the screen for the user.

Unfortunately, something seems to have been changed in the CRM, and now the message is just this:

06166.Capture.PNG

Also, the detail log contains ONLY this line and nothing else:

The operation was aborted due to ISV code.

This really feels... wrong, on many levels. The log file not containing any relevant information, the lack of a clear message to the user. Is this some kind of recent MS change? Is there some kind of new way to "throw" nice, business-related errors to the user from a plugin?

*This post is locked for comments

  • Mikael Suokas Profile Picture
    Mikael Suokas 5 on at
    RE: InvalidPluginExecutionException no longer returning a "nice" user message in CRM 365 9.1.0.2842 when resolving cases (incident entity)

    I realize this is an old question, but I ran into this just today, so this may be helpful to someone out there.

    I just made a plugin validating fields during incident resolution, and had this exact same problem: the message from InvalidPluginExecutionException would not show up to the user, only the class name of the plugin. In my case the InvalidPluginExecutionException would be wrapped in another InvalidPluginExecutionException in my top-level exception handler. When I added an explicit catch in the top level handler to just pass pass InvalidPluginExecutionException through, I would get the clear message in the UI:

               catch (InvalidPluginExecutionException e)

               {

                   throw;

               }

  • MateuszBender Profile Picture
    MateuszBender 210 on at
    RE: InvalidPluginExecutionException no longer returning a "nice" user message in CRM 365 9.1.0.2842 when resolving cases (incident entity)

    [quote user="Goutam Das"]

    May be  the error is  coming from another plugin or different code  where the error does not handled properly.

    This error is also coming when you have multiple plugin and the message does not overwrited. So disabled all associated plugin with the and only enable the plugin which you are expecting to show the message

    How can you sure that the the message should populate? Do you have any trace log? did you tried to debug?

    Try to debug and also put some trace log in your plugin code.[/quote]

    This is DEFINITELY not a problem with my code.

    a) It used to work just fine and there were no updates.
    b) I know exactly which two lines of code that are responsible: a simple if (condition) statement followed by a throw new exception statement; commenting these out makes the plugin continue without issues (but this isn't what the customer wants, obviously).
    c) The same code can be applied not just to incident closure, but also incident updates - it seems to work fine then; it's only when it's applied to incident updates when resolving cases - that's when the errors are suppressed.
    d) Put some trace? Isn't that what the detailed log should be for, in CRM Online? As I outlined in my original post - the log file is almost completely empty, except for a rather useless line...

  • gdas Profile Picture
    gdas 50,085 on at
    RE: InvalidPluginExecutionException no longer returning a "nice" user message in CRM 365 9.1.0.2842 when resolving cases (incident entity)

    May be  the error is  coming from another plugin or different code  where the error does not handled properly.

    This error is also coming when you have multiple plugin and the message does not overwrited. So disabled all associated plugin with the and only enable the plugin which you are expecting to show the message

    How can you sure that the the message should populate? Do you have any trace log? did you tried to debug?

    Try to debug and also put some trace log in your plugin code.

  • Suggested answer
    Radu Chiribelea Profile Picture
    Radu Chiribelea 6,667 on at
    RE: InvalidPluginExecutionException no longer returning a "nice" user message in CRM 365 9.1.0.2842 when resolving cases (incident entity)

    I would open a support case with Microsoft and check with them if this isn't a known bug. This happened in past builds as well so it wouldn't be a surprise if this is a regression.

    Regards,

    Radu

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans