...Человеческий поиск в разработке...
- Модуль: crm
- Путь к файлу: ~/bitrix/modules/crm/lib/integrity/duplicatecriterion.php
- Класс: Bitrix\Crm\Integrity\DuplicateCriterion
- Вызов: DuplicateCriterion::applyEntityCategoryFilter
protected function applyEntityCategoryFilter(int $entityTypeId, array $getListParams): array { $refTables = [ \CCrmOwnerType::Contact => ContactTable::class, \CCrmOwnerType::Company => CompanyTable::class, ]; if (!is_null($this->getCategoryId()) && isset($refTables[$entityTypeId])) { $getListParams['runtime'] = [ new ReferenceField('UA', $refTables[$entityTypeId]::getEntity(), [ '=ref.ID' => 'this.ENTITY_ID', '=ref.CATEGORY_ID' => new SqlExpression('?i', $this->getCategoryId()), ], ['join_type' => Main\ORM\Query\Join::TYPE_INNER] ) ]; } return $getListParams; }