A
A
Anya Ivanova2021-08-03 12:33:17
1C-Bitrix
Anya Ivanova, 2021-08-03 12:33:17

How can custom fields be linked?

It is necessary to make sure that the user on the site has fields that would display the account number and a list of documents associated with the account number.
So far, I've managed to simply display a list of documents (files) in the user's personal account, now I don't know how to associate them with a specific number.
Help me please..

<?
global $USER;
$order = array('sort' => 'asc');
$tmp = 'sort';
$filter = array('ID' => $USER->GetID());
$select = array("SELECT" => array("UF_FILE_DOC"));
$rsUsers = CUser::GetList($order, $tmp, $filter, $select);
while ($arUser = $rsUsers->Fetch()) {
    $fileId = $arUser['UF_FILE_DOC'];
}
?>
<?foreach($fileId as $arLogoID):?>
    <?$arFile[$arLogoID] = CFile::GetFileArray($arLogoID);?>
    <a href="<?=$arFile[$arLogoID]["SRC"]?>" target="_blank"><?=$arFile[$arLogoID]["ORIGINAL_NAME"]?></a>
<?endforeach;?>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
no_one_safe, 2021-08-03
@saharok13

1. Multiple user property of type binding to element - user accounts.
2. These elements have a multiple property of type binding to the element - invoice documents.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question