->registerRuntimeField('PRICE', [
'data_type' => \Bitrix\Catalog\PriceTable::class,
'reference' => [
'=this.ID' => 'ref.PRODUCT_ID',
'=ref.CATALOG_GROUP_ID' => new \Bitrix\Main\DB\SqlExpression('?', 1)
]
])
$query = \Entities\Marketing\PostingTmpTable::query()
->registerRuntimeField('CONTACT', [
'data_type' => '\Bitrix\Sender\ContactTable',
'reference' => [
'=this.CONTACT_ID' => 'ref.ID',
],
])
->registerRuntimeField('PROPERTY', [
'data_type' => $hlBlockEntity,
'reference' => [
'=this.CONTACT.CODE' => 'ref.UF_EMAIL'
],
])
;
$section = \Bitrix\Iblock\SectionTable::query()
->where('IBLOCK_ID', $iblockId)
->where('CODE', 'КОД РАЗДЕЛА')
->where('ACTIVE', 'Y')
->setSelect(['*'])
->exec()
->fetch()
;
$query = \Entities\Marketing\PostingTmpTable::query()
->registerRuntimeField('CONTACT', [
'data_type' => '\Bitrix\Sender\ContactTable',
'reference' => [
'=this.CONTACT_ID' => 'ref.ID',
],
// 'join_type' => 'right'
])
->registerRuntimeField('PROPERTY', [
'data_type' => $hlBlockEntity,
'reference' => [
'=this.CONTACT.CODE' => 'ref.UF_EMAIL'
],
// 'join_type' => 'right'
])
;
$xmlIds = [];
foreach ($arResult['ITEMS'] as $index => $arItem) {
$xmlIds[] = $arItem['PROPERTIES']['PROP']['VALUE']];
}
$xmlIds = array_unique($xmlIds);
if(!empty($xmlIds)){
$resultArray = \Bitrix\Highloadblock\HighloadBlockTable::compileEntity('Entity')->getDataClass()::getList([
'select' => ['UF_NAME'],
'filter' => ['@UF_XML_ID' => $xmlIds],
]);
while ($rowArray = $resultObj->fetch()) {
$arRef[$resultArray['UF_XML_ID']] = $resultArray['UF_NAME'];
}
}