echo json_encode(TRUE);
CRM_Utils_System::civiExit();
}
+
+ /**
+ * Function to delete relationships specific to case and relationship type
+ */
+ static function deleteCaseRoles() {
+ $caseId = CRM_Utils_Type::escape($_POST['case_id'], 'Integer');
+ $relType = CRM_Utils_Type::escape($_POST['rel_type'], 'Integer');
+
+ $sql = "DELETE FROM civicrm_relationship WHERE case_id={$caseId} AND relationship_type_id={$relType}";
+ CRM_Core_DAO::executeQuery($sql);
+
+ CRM_Utils_System::civiExit();
+ }
}