- Модуль: crm
- Путь к файлу: ~/bitrix/modules/crm/lib/integrity/actualentityselector.php
- Класс: Bitrix\Crm\Integrity\ActualEntitySelector
- Вызов: ActualEntitySelector::setDynamicTypeId
public function setDynamicTypeId($entityTypeId) { $entityTypeId = (int)$entityTypeId; if (\CCrmOwnerType::isUseDynamicTypeBasedApproach($entityTypeId)) { foreach($this->entities as $index => $entity) { if (!in_array($entity['CODE'], ['dynamics', 'companyDynamics', 'contactDynamics'])) { continue; } if ($entity['TYPE_ID'] === $entityTypeId) { continue; } $this->entities[$index]['TYPE_ID'] = $entityTypeId; $this->entities[$index]['ID'] = []; } } return $this; }