• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/Service/EventHistory.php
  • Класс: Bitrix\Crm\Service\EventHistory
  • Вызов: EventHistory::createEventTableRecord
protected function createEventTableRecord(int $eventType, Context $context = null): EO_Event
{
	$context = $context ?? Container::getInstance()->getContext();

	// Empty strings by default because old API (CCrmEvent) was using them instead of NULL value
	return EventTable::createObject(
		[
			'CREATED_BY_ID' => $context->getUserId(),
			'EVENT_ID' => '',
			'EVENT_NAME' => $this->getDefaultEventName($eventType),
			'EVENT_TYPE' => $eventType,
			'EVENT_TEXT_1' => '',
			'EVENT_TEXT_2' => '',
			'DATE_CREATE' => new DateTime(),
			'FILES' => null,
		]
	);
}