Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Error message in MS CRM C# Plugin

Posted on by 225

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

  • Suggested answer
    Dynamics365 Rocker Profile Picture
    Dynamics365 Rocker 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
    Kokulan 18,048 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

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,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans