Hi All,
I am trying to call Portals Web API for updating a record using below function and i have a plugin in some cases. I tried to capture error in "error" block and portal is showing plugin error in case of plugin exception. However, it is displaying two alerts
One for Plugin Exception as Alert
One for common data exception error
Can anyone help in restricting the multiple alerts
Below is my code
function updateCRMRecord(recordObj,tablepluralname,id) {
appAjax('Updating Record', {
type: "PATCH",
url: "/_api/"+ tablepluralname+"("+id+")",
contentType: "application/json",
data: JSON.stringify(recordObj),
success: function (res, status, xhr) {
alert('Success');
},
error:function(res) {
var err= JSON.stringify(res);
var err1 = JSON.parse(err);
alert(err1.responseJSON["error"]["innererror"].message);
return;
console.log(res);
}
});
return false;
}
Can anyone help how can i stop displaying common data services error alert however need to display inner error
I have already enabled inner error site setting