$assignmentParams['contact_id'] = $params['assignee_contact_id'];
$assignmentParams['record_type_id'] = $assigneeID;
if (CRM_Utils_Array::value('id', $params)) {
- $assignment = new CRM_Activity_BAO_ActivityAssignment();
+ $assignment = new CRM_Activity_BAO_ActivityContact();
$assignment->activity_id = $activityId;
$assignment->record_type_id = $assigneeID;
$assignment->find(TRUE);
*
*/
public static function create(&$params) {
- $assignment = new CRM_Activity_BAO_ActivityAssignment();
+ $assignment = new CRM_Activity_BAO_ActivityContact();
$activityContacts = CRM_Core_PseudoConstant::activityContacts('name');
$assigneeID = CRM_Utils_Array::key('Activity Assignees', $activityContacts);
$assignment->copyValues($params);
$assignment->record_type_id = $assigneeID;
- if (isset($assignment->assignee_contact_id)) {
- $assignment->contact_id = $assignment->assignee_contact_id;
- }
+
return $assignment->save();
}