C
C
Combat72018-01-30 20:11:30
1C-Bitrix
Combat7, 2018-01-30 20:11:30

How to display the directory property in Bitrix?

I have a directory with id5
It has a record with id 100
I need to get two fields for this record
How to do it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
I'm Yoda, 2018-01-30
@Anadi

Like this

if (CModule::IncludeModule('highloadblock')) {

    $ID = 1; // ИД 

    $hldata = Bitrix\Highloadblock\HighloadBlockTable::getById($ID)->fetch();
    $hlentity = Bitrix\Highloadblock\HighloadBlockTable::compileEntity($hldata);
    $hlDataClass = $hldata["NAME"] . "Table";

    $result = $hlDataClass::getList(array(
                "select" => array("ID", "UF_NAME", "UF_XML_ID"), // Поля для выборки
                "order" => array("UF_SORT" => "ASC"),
                "filter" => array(),
    ));

    while ($res = $result->fetch()) {
    // Выводите что вам надо
    }
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question