Answer the question
In order to leave comments, you need to log in
Why can't getList work for me?
I'm trying to use GetList, but I can't display the required infoblocks, I don't know why
CModule::IncludeModule('highloadblock');
$bWholesale = in_array($USER::WHOLESALE, $USER->GetUserGroupArray());
$wholesale = $bWholesale ? 'true' : 'false';
$hlblock = HighloadBlockTable::getById(HighloadBlockTable::TRANSPORT)->fetch();
$enity = HighloadBlockTable::compileEntity($hlblock);
$entityClass = $enity->getDataClass();
$res = $entityClass::getList(array(
'select' => array('UF_NAME'),
'filter' => array('UF_ACTIVE' => 1)
));
while($row = $res->fetch()){
$arResult['listCompany'] = $row['UF_NAME'];
}
array (size=3)
'ID' => string '1' (length=1)
'NAME' => string 'Transpot' (length=8)
'TABLE_NAME' => string 'b_transport_company' (length=19)
SELECT UF_NAME
FROM `b_transport_company`
WHERE UF_ACTIVE = 1
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question