Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

How can I stop the Business Process Error exception message.

Posted on by Microsoft Employee

Hi,

I am new in Microsoft Dynamics CRM.

I am throwing exception from plugin like,

 throw new InvalidPluginExecutionException(serviceExp.Message.ToString());

and receive the exception in javascript like,

function documentsend(){ 

     Xrm.Page.data.save().then(successCallback, errorCallback);            
}

function successCallback() {
    alert("Submitted");
} 
function errorCallback(response) {  
               
     Xrm.Page.ui.setFormNotification(response , 'ERROR');      
}

Now, I am able to set the message on notification but after setting the message , Business Process Error message also comes on screen.

How can I stop the  Business Process Error exception message.

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How can I stop the Business Process Error exception message.

    Refer this:

    missdynamicscrm.blogspot.sg/.../pass-plugin-context-message-c-exception-to-crm-javascript-ribbon.html

  • Suggested answer
    Nithya Gopinath Profile Picture
    Nithya Gopinath 17,074 on at
    RE: How can I stop the Business Process Error exception message.

    I think it is not possible. We are not able to stop the business process errors in dynamics CRM. It is a platform error which you can't hide by default.

  • sathis kumar Profile Picture
    sathis kumar on at
    RE: How can I stop the Business Process Error exception message.

    Hi,

    It is not possible to stop the Business Process Error because it is unhandled error throwing directly from the server. Instead of that ,you can create one bool field and one text field set the value to true if the error throws pass the value in the Plugin and update it.  After that on save if it is true and throw the notifications from the client side notifications.

    Regards,

    Sathis

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How can I stop the Business Process Error exception message.

    Thanks Nithya  i am follow the link, but these thing i have already done .

    In my scenario, I am sending InvalidPluginExecutionException from plugin and  I want to set this exception message in notification .

    Now , i am able to set notification message but after setting the message , Business Process Error message also comes on screen.

    can i stop the  Business Process Error exception message .

  • BadrinathB Profile Picture
    BadrinathB 970 on at
    RE: How can I stop the Business Process Error exception message.

    Business Process Error comes because you are throwing the exception and if you swallow the exception (I mean if you comment it) then it will not throw. In that case you have to manage with some flag.

  • Suggested answer
    Nithya Gopinath Profile Picture
    Nithya Gopinath 17,074 on at
    RE: How can I stop the Business Process Error exception message.

    Hi,

    The Business Process Error you get is the InvalidpluginExecutionException that you have thrown using the statement.

    Please refer the link below.

    onemichaelscott.wordpress.com/.../unexpected-error-get-meaningful-error-messages-from-plugin-constructors

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