Company::getContactPersonFullName

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. Company
  4. getContactPersonFullName
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/integration/catalog/contractor/company.php
  • Класс: Bitrix\Crm\Integration\Catalog\Contractor\Company
  • Вызов: Company::getContactPersonFullName
public function getContactPersonFullName(): ?string
{
	$contactFactory = Container::getInstance()->getFactory(\CCrmOwnerType::Contact);
	if (!$contactFactory)
	{
		return null;
	}

	$contacts = $contactFactory->getItems([
		'filter' => [
			'=COMPANY_ID' => $this->company->getId(),
		],
	]);
	if (empty($contacts))
	{
		return null;
	}

	return $contacts[0]->getName();
}

Добавить комментарий