CrmDeal::getCurrentEntityFields

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. CrmDeal
  4. getCurrentEntityFields
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/integration/socialnetwork/livefeed/crmdeal.php
  • Класс: Bitrix\Crm\Integration\Socialnetwork\Livefeed\CrmDeal
  • Вызов: CrmDeal::getCurrentEntityFields
public function getCurrentEntityFields(): array
{
	$result = [];

	$res = LogTable::getList([
		'filter' => [
			'=ID' => $this->getEntityId()
		],
		'select' => [ 'ENTITY_ID' ]
	]);
	if ($logEntryFields = $res->fetch())
	{
		$res = \CCrmDeal::getListEx(
			[],
			[
				'ID' => $logEntryFields['ENTITY_ID'],
				'CHECK_PERMISSIONS' => 'N',
			],
			false,
			[ 'nTopCount' => 1 ],
			[]
		);
		if ($currentEntity = $res->fetch())
		{
			$result = $currentEntity;
		}
	}

	return $result;
}

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