- Модуль: crm
- Путь к файлу: ~/bitrix/modules/crm/lib/search/dealsearchcontentbuilder.php
- Класс: Bitrix\Crm\Search\DealSearchContentBuilder
- Вызов: DealSearchContentBuilder::saveShortIndex
protected function saveShortIndex(int $entityId, SearchMap $map, bool $checkExist = false): \Bitrix\Main\DB\Result
{
$connection = \Bitrix\Main\Application::getConnection();
$helper = $connection->getSqlHelper();
$searchContent = $map->getString();
$insert = [
'DEAL_ID' => $entityId,
'SEARCH_CONTENT' => $searchContent,
];
$update = [
'SEARCH_CONTENT' => $searchContent,
];
$merge = $helper->prepareMerge('b_crm_deal_index', ['DEAL_ID'], $insert, $update);
return $connection->query($merge[0]);
}