CallList::deleteByOwner

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. CallList
  4. deleteByOwner
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/calllist/calllist.php
  • Класс: Bitrix\Crm\CallList\CallList
  • Вызов: CallList::deleteByOwner
static function deleteByOwner($entityTypeId, $entityId)
{
	//Waiting for ENTITY_TYPE column in b_crm_call_list_item
	/*
	if($entityTypeId <= 0)
	{
		throw new Main\ArgumentException('Must be greater than zero.', 'oldEntityTypeID');
	}

	if($entityId <= 0)
	{
		throw new Main\ArgumentException('Must be greater than zero.', 'oldEntityID');
	}

	$entityTypeName = \CCrmOwnerType::ResolveName($entityTypeId);
	if($entityTypeName === '')
	{
		throw new Main\ArgumentException("Could not resolve Entity Type Name: {$entityTypeId}.", 'entityTypeId');
	}

	$connection = Main\Application::getConnection();
	$helper = $connection->getSqlHelper();

	$entityTypeName = $helper->forSql($entityTypeName);

	Main\Application::getConnection()->queryExecute(
		"DELETE FROM b_crm_call_list_created WHERE ENTITY_TYPE = '{$entityTypeName}' AND ENTITY_ID = {$entityId}"
	);

	Main\Application::getConnection()->queryExecute(
		"DELETE FROM b_crm_call_list_item WHERE ENTITY_TYPE = '{$entityTypeName}' AND ELEMENT_ID = {$entityId}"
	);
	*/
}

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