Search code examples
crmmicrosoft-dynamics

Hiding Business Process Error in Microsoft Dynamics CRM


I am new to Microsoft Dynamics CRM. I am using a plugin in CRM and throwing message through exception like below:

throw new InvalidPluginExecutionException("\n success.....\n" + response);

and I handle it in CRM webresource. Webresouce code is:

 Xrm.Page.data.save().then(successCallback, errorCallback);
function successCallback() {
   alert("Successfully completed the task"+ response.message);
}

function errorCallback(response) {
     Xrm.Page.ui.setFormNotification("!!"+JSON.stringify(response.message), 'ERROR');    
}

But, after displaying the success alert or error notification, it also displays the Business Process Error. Now How I hide this Business Process Error alerts.


Solution

  • Rather than hiding the error, you'll need to figure out why the plugin is failing and resolve that issue. That is a platform error which you can't hide by default.