Service::getAssignedWithCrmData

  1. Bitrix24 API (v. 23.675.0)
  2. sender
  3. Service
  4. getAssignedWithCrmData
  • Модуль: sender
  • Путь к файлу: ~/bitrix/modules/sender/lib/integration/crm/returncustomer/transportbase.php
  • Класс: Bitrix\Sender\Integration\Crm\ReturnCustomer\TransportBase
  • Вызов: TransportBase::getAssignedWithCrmData
private function getAssignedWithCrmData(int $typeId, int $entityId): ?int
{
	$factory = Container::getInstance()->getFactory($typeId);

	if (!$factory)
	{
		return null;
	}

	$entity = $factory->getItem($entityId);
	if ($entity)
	{
		$assignedId = (int)$entity->get('ASSIGNED_BY_ID');
		if ($assignedId)
		{
			return $assignedId;
		}
	}

	return null;
}

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