TraceTable::getSpareTraceIdByChannel

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. TraceTable
  4. getSpareTraceIdByChannel
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/tracking/internals/trace.php
  • Класс: Bitrix\Crm\Tracking\Internals\TraceTable
  • Вызов: TraceTable::getSpareTraceIdByChannel
static function getSpareTraceIdByChannel($channelCode, $channelValue, DateTime $dateCreateFrom)
{
	$row = static::getList([
		'select' => ['ID'],
		'filter' => [
			'>DATE_CREATE' => $dateCreateFrom,
			'=ENTITY.ID' => null,
			'=CHANNEL.CODE' => $channelCode,
			'=CHANNEL.VALUE' => $channelValue,
		],
		'order' => ['ID' => 'ASC']
	])->fetch();

	return $row ? $row['ID'] : null;
}

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