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

ErrorCallback on save.then not firing if there is a plugin error

$
0
0

Hi All,

I am using the below code on a ribbon control. The successCallback shows the notification but errorCallback doesn't get called or shows the notification if there is a plugin error. I don't want the Business Process Error alert rather want to show the message in notification. Please suggest if this can be achieved.

Thanks

Girish

function

updateApplicationStatus(status)

{

    Xrm.Page.getAttribute(

"new_applicationstatus").setValue(status);

    Xrm.Page.data.save().then(toAppstatusSuccessCallback, toAppstatusErrorCallback);

}


function

toAppstatusSuccessCallback()

{

    Xrm.Page.ui.setFormNotification(

"Application Validated Successfully !!!","INFO","toValidationProcessNotification");

}



function

toAppstatusErrorCallback(errorcode, errorMessage)

{

    Xrm.Page.ui.setFormNotification(errorMessage,

"ERROR","toValidationProcessNotification");

}


Girish Tripathi Sharepoint 2010 Developer


Viewing all articles
Browse latest Browse all 8223

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>