• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/entitymanagefacility.php
  • Класс: Bitrix\Crm\EntityManageFacility
  • Вызов: EntityManageFacility::registerDeal
public function registerDeal(array &$fields, $updateSearch = true, $options = array())
{
	$this->registeredId = null;
	$this->registeredTypeId = \CCrmOwnerType::Deal;
	$this->isBpRun = false;

	if ($this->canAddDeal())
	{
		$this->registeredId = $this->addDeal($fields, $updateSearch, $options);
		$this->registeredEntities->addIdentificator(
			$this->registeredTypeId,
			$this->registeredId,
			true
		);
	}

	if ($this->isAutomationRun)
	{
		$this->runAutomation();
	}

	return $this->registeredId;
}