From eb8e4c2d9bf7807315c03bee08202dd0cebc0e7b Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Sun, 13 Jul 2014 23:17:12 -0700 Subject: [PATCH] CRM-14789 - crmCaseType - Pass through more specific error --- js/angular-crmCaseType.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/js/angular-crmCaseType.js b/js/angular-crmCaseType.js index 131dd62f87..8f579356b1 100644 --- a/js/angular-crmCaseType.js +++ b/js/angular-crmCaseType.js @@ -295,7 +295,11 @@ }); }; $scope.deleteCaseType = function (caseType) { - crmApi('CaseType', 'delete', {id: caseType.id}, true) + crmApi('CaseType', 'delete', {id: caseType.id}, { + error: function (data) { + CRM.alert(data.error_message, ts('Error')); + } + }) .then(function (data) { if (!data.is_error) { delete caseTypes.values[caseType.id]; -- 2.25.1