• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/history/entity/leadstatushistory.php
  • Класс: Bitrix\Crm\History\Entity\LeadStatusHistoryTable
  • Вызов: LeadStatusHistoryTable::deleteByOwner
static function deleteByOwner($ownerID)
{
	if(!is_int($ownerID))
	{
		$ownerID = (int)$ownerID;
	}

	if($ownerID <= 0)
	{
		throw new Main\ArgumentException('Owner ID must be greater than zero.', 'ownerID');
	}

	Main\Application::getConnection()->queryExecute("DELETE FROM b_crm_lead_status_history WHERE OWNER_ID = {$ownerID}");
}