EventHandler::onAfterUserTypeDelete

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. EventHandler
  4. onAfterUserTypeDelete
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/integration/main/eventhandler.php
  • Класс: Bitrix\Crm\Integration\Main\EventHandler
  • Вызов: EventHandler::onAfterUserTypeDelete
static function onAfterUserTypeDelete(array $field, $id)
{
	$crmEntityPrefix = ServiceLocator::getInstance()->get('crm.type.factory')->getUserFieldEntityPrefix();
	if(strpos($field['ENTITY_ID'], $crmEntityPrefix) === 0)
	{
		$entityTypeId = \CCrmOwnerType::ResolveIDByUFEntityID($field['ENTITY_ID']);
		if(isset($field['FIELD_NAME']))
		{
			(new ItemCategoryUserField($entityTypeId))->deleteByName($field['FIELD_NAME']);
		}
	}

	Integrity\Volatile\EventHandler::onUserFieldDelete($field, (int)$id);
}

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