web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Error message in MS CRM C# Plugin

(0) ShareShare
ReportReport
Posted on by 233

Hello ,

Actually I tried to show the error message by using throw new InvalidPluginExcecutionException("message"); but i need the error message in form of alert or pop up message as i tried by using MessageBox.Show("message") and added the related dll "using Simplify.Windows.Forms"  it is not supporting please any body suggest me.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Dynamics365 Rocker Profile Picture
    7,755 on at
    RE: Error message in MS CRM C# Plugin

    I suggest to avoid unsupported code.

    I got this type of requirement many time but I always explained to customer that this is not feasible and CRM has some limits.

    I suggest you to use "throw new InvalidPluginExcecutionException("message");" for popup.

  • Suggested answer
    Kokulan Profile Picture
    18,054 on at
    RE: Error message in MS CRM C# Plugin

    Hi

    When a plugin throws an exception, it will always be displayed within out of the box business process error dialog, you won't be able to customize this dialog.

    And Winforms library or UI is not supported by CRM because Dynamics CRM UI is a Web Application.

    If you would like to display a friendly error message using a custom UI, you could move your code into a Custom Workflow Activity (CWA) and call that in an Action and then you could call the action in Javascript and if the code fails, you could return meaningful message to JS and then display the friendly message using V9 alert dialogs as explained in the links below

    community.dynamics.com/.../d365-v9-alert-dialog

    community.dynamics.com/.../dynamics-v9-0-show-alert-confirm-error-in-modal-style-with-new-client-api-in-dynamics-version-9-0

    If the above suggestions do not suit your requirements, please provide us with more details and we should be able to help

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Mansi Soni – Community Spotlight

We are honored to recognize Mansi Soni as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
Community Member Profile Picture

Community Member 2

#2
Christoph Pock Profile Picture

Christoph Pock 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans