----------------------------------------
* CRM-14474: Update CiviCase XML processor to load from DB *or* file
https://issues.civicrm.org/jira/browse/CRM-14474
$count = CRM_Core_DAO::singleValueQuery($query, $sqlParams);
// check for max instance
- $caseType = CRM_Case_BAO_Case::getCaseType($params['caseID'], 'title');
+ $caseType = CRM_Case_BAO_Case::getCaseType($params['caseID'], 'name');
$maxInstance = self::getMaxInstance($caseType, $params['activityTypeName']);
return $maxInstance ? ($count < $maxInstance ? FALSE : TRUE) : FALSE;