// update existing case record if needed
$caseParams = $params;
$caseParams['id'] = $vval['case_id'];
- if (!empty($caseParams['case_type_id'])) {
- $caseParams['case_type_id'] = CRM_Core_DAO::VALUE_SEPARATOR . $caseParams['case_type_id'] . CRM_Core_DAO::VALUE_SEPARATOR;
- }
if (!empty($caseParams['case_status_id'])) {
$caseParams['status_id'] = $caseParams['case_status_id'];
}
$form->removeElement('status_id');
$form->removeElement('priority_id');
+ $caseId = CRM_Utils_Array::first($form->_caseId);
$form->_caseType = CRM_Case_PseudoConstant::caseType();
$form->_caseTypeId = CRM_Core_DAO::getFieldValue('CRM_Case_DAO_Case',
- $form->_caseId,
+ $caseId,
'case_type_id'
);
if (!in_array($form->_caseTypeId, $form->_caseType)) {
// 1. initiate xml processor
$xmlProcessor = new CRM_Case_XMLProcessor_Process();
+ $caseId = CRM_Utils_Array::first($form->_caseId);
$xmlProcessorParams = array(
'clientID' => $form->_currentlyViewedContactId,
'creatorID' => $form->_currentUserId,
'standardTimeline' => 1,
'activityTypeName' => 'Change Case Type',
'activity_date_time' => CRM_Utils_Array::value('reset_date_time', $params),
- 'caseID' => $form->_caseId,
+ 'caseID' => $caseId,
'resetTimeline' => CRM_Utils_Array::value('is_reset_timeline', $params),
);