CRM_Core_BAO_ActionLog::create($logParams);
// insert activity log record if needed
- if ($actionSchedule->record_activity) {
+ if ($actionSchedule->record_activity && !$isError) {
$activityParams = array(
'subject' => $actionSchedule->title,
'details' => $actionSchedule->body_html,
'activity_type_id' => $activityTypeID,
'source_record_id' => $dao->entityID,
);
- $activity = CRM_Activity_BAO_Activity::create($activityParams);
+ CRM_Activity_BAO_Activity::create($activityParams);
}
}