Answer the question
In order to leave comments, you need to log in
How to get custom forum message field CForumMessage::GetListEx?
Property created
Why doesn't the function return it?
Returns a list of messages (including related data) ....
$res = CForumMessage::GetListEx(array("POST_DATE"=>"DESC"), array('@TOPIC_ID'=>$arTopicIds), false, false, ["ID", "UF_ADMIN_ANSWER"]);
while($arMessages = $res->Fetch())
{
// ... смотрим дамп
}
Answer the question
In order to leave comments, you need to log in
As the analysis of the Bitrix code showed, contrary to the documentation (or the ambiguity of what was written), user fields are selected by the CForumMessage::GetList function, and not GetListEx
$res = CForumMessage::GetList(array("POST_DATE"=>"DESC"), array("@TOPIC_ID" => [540, 557], ), false, 0, [ "SELECT" => ["UF_ADMIN_ANSWER"]]);
while($arMessages = $res->Fetch())
{
var_dump($arMessages);
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question