D
D
Darklt2022-03-31 13:31:31
1C-Bitrix
Darklt, 2022-03-31 13:31:31

How to extract the Registration Address from the contragents.xml file in the import of users?

From 1C we unload counterparties in the form of users in Bitrix, the TIN, full name, etc. fields are filled in, but the Registration Address field is neither in the profile nor the user. Created an add property. UF_ADRESS , but I couldn't find how to fill it in the documentation anywhere.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2022-03-31
@kikher

AddEventHandler("iblock", "OnBeforeIBlockElementUpdate", "UserUpd");
AddEventHandler("iblock", "OnBeforeIBlockElementAdd", "UserUpd");
function UserUpd(&$arFields)
{
    if ($_REQUEST['mode'] == 'import') {
        // в $arFields можешь получить нужные данные и потом через API записывай
    }
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question