• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/agent/activity/uncompleted/uncompletedrecalculation.php
  • Класс: Bitrix\Crm\Agent\Activity\Uncompleted\UncompletedRecalculation
  • Вызов: UncompletedRecalculation::queryIds
private function queryIds(int $lastId): array
{
	$q = EntityUncompletedActivityTable::query()
		->setSelect(['ID'])
		->where('ID', '>', $lastId)
		->where('RESPONSIBLE_ID', '>', 0) // row with RESPONSIBLE_ID = 0 will be recalculated together with `activity` user
		->setOrder(['ID' => 'ASC'])
		->setLimit($this->getLimit());

	return array_column($q->fetchAll(), 'ID');
}