• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/tracking/internals/pool.php
  • Класс: Bitrix\Crm\Tracking\Internals\PoolTable
  • Вызов: PoolTable::removePoolItem
static function removePoolItem($typeId, $value)
{
	$normalizedValue = Communication\Normalizer::normalize($value, $typeId);
	if (!Communication\Validator::validate($normalizedValue, $typeId))
	{
		return false;
	}

	$row = static::getRow([
		'select' => ['ID'],
		'filter' => ['=TYPE_ID' => $typeId, '=VALUE' => [$value, $normalizedValue]]
	]);
	if (!$row)
	{
		return true;
	}

	return static::delete($row['ID'])->isSuccess();
}