\Bitrix\Main\Loader::IncludeModule("highloadblock");
$xmlID = '21XlirMU'; //подставьте нужный вам внешний код
$tblName = 'years';
$select = ['UF_NAME']; // или как у вас поле называется
$filter = ['UF_XML_ID'=>$xmlID];
$limit = 1;
$hlblock = \Bitrix\Highloadblock\HighloadBlockTable::getList(
array("filter" => array('TABLE_NAME' => $tblName))
)->fetch();
$entity = \Bitrix\Highloadblock\HighloadBlockTable::compileEntity($hlblock);
$Query = new \Bitrix\Main\Entity\Query($entity);
$Query->setSelect($select);
$Query->setFilter($filter);
$Query->setOrder([]);
$Query->setLimit($limit);
$result = $Query->exec();
$arResult = new \CDBResult($result);
CModule::IncludeModule("highloadblock");
$hldata = Bitrix\Highloadblock\HighloadBlockTable::getById($Highloadblock_id)->fetch();
$hlentity = Bitrix\Highloadblock\HighloadBlockTable::compileEntity($hldata);
$hlDataClass = $hldata["NAME"]."Table";
$result = $hlDataClass::getList(array(
"select" => array("UF_NAME"),
"order" => array(),
"filter" => array("UF_XML_ID"=>$xmlID),
));
while($res = $result->fetch())
{
$tital[] = $res["UF_NAME"];
}