CCrmEvent::DeleteByElement

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. CCrmEvent
  4. DeleteByElement
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/classes/general/crm_event.php
  • Класс: \CCrmEvent
  • Вызов: CCrmEvent::DeleteByElement
public function DeleteByElement($entityTypeName, $entityID)
{
	$entityID = (int)$entityID;

	if ($entityTypeName == '' || $entityID == 0)
	{
		return false;
	}

	$db_events = GetModuleEvents('crm', 'OnBeforeCrmEventDeleteByElement');
	while($arEvent = $db_events->Fetch())
		ExecuteModuleEventEx($arEvent, array($entityTypeName, $entityID));

	Crm\EventRelationsTable::deleteByItem(\CCrmOwnerType::ResolveID($entityTypeName), $entityID);

	return new \CDBResult();
}

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