Entity::traceOrder

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. Entity
  4. traceOrder
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/tracking/entity.php
  • Класс: Bitrix\Crm\Tracking\Entity
  • Вызов: Entity::traceOrder
static function traceOrder($orderId, $entityTypeId, $entityId)
{
	if (!$orderId || !$entityId || !$entityTypeId)
	{
		return;
	}

	$traceId = Internals\TraceTable::getSpareTraceIdByChannel(
		Tracking\Channel\Base::Order,
		$orderId,
		(new DateTime())->add('-' . Tracking\Trace::FIND_ENTITIES_TIME_DAYS . ' days')
	);
	if (!$traceId)
	{
		return;
	}

	Tracking\Trace::appendEntity($traceId, $entityTypeId, $entityId);
}

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