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
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
Still i am getting two messages one from plugin exception as alert (working properly) and after i click ok it is again showing common data service error
Hi,
please refer the below code snippet:-
CrmCController.addComment = function () {
debugger;
var dataToUpdate = {
"new_comment": CrmCController.currentcomment
};
webapi.safeAjax({
type: "PATCH",
url: "/_api/new_attendeesdetailses(" + eventAttendeeId + ")",
contentType: "application/json",
data: JSON.stringify(dataToUpdate),
success: function (res, status, xhr) {
console.log(res);
window.location.href = '/events';
// $('#mainBodyContainer').hideLoading();
},
error: function (XMLHttpRequest, textStatus, errorThrown) {
alert(XMLHttpRequest.responseJSON.error.innererror.message);
}
});
}
Thanks,
Manoj.
Please mark this as VERIFIED if it helps.
André Arnaud de Cal...
291,979
Super User 2025 Season 1
Martin Dráb
230,848
Most Valuable Professional
nmaenpaa
101,156