• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/kanban/entity/dynamic.php
  • Класс: Bitrix\Crm\Kanban\Entity\Dynamic
  • Вызов: Dynamic::getItemLastId
public function getItemLastId(): int
{
	if($this->itemLastId === null)
	{
		$this->itemLastId = 0;

		$items = $this->factory->getItemsFilteredByPermissions([
			'select' => ['ID'],
			'order' => [
				'ID' => 'DESC',
			],
			'limit' => 1,
		]);
		if(!empty($items))
		{
			$this->itemLastId = $items[0]->getId();
		}
	}

	return $this->itemLastId;
}