Created
September 26, 2025 13:14
-
-
Save Feiron/0ca85bbbe2268f70264783235166a7c6 to your computer and use it in GitHub Desktop.
[Копирование УФ полей] #bitrix#utils#export
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| define('STOP_STATISTICS', true); | |
| define('BX_SECURITY_SHOW_MESSAGE', true); | |
| define("NOT_CHECK_PERMISSIONS", true); | |
| $_SERVER['DOCUMENT_ROOT'] = '/home/bitrix/www'; | |
| require_once($_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/main/include/prolog_before.php'); | |
| \CModule::IncludeModule("crm"); | |
| //UF_CRM_DCT_YA_CID | |
| //UF_CRM_1719320560331 | |
| $dbLeads = \CCrmLead::GetList([], ['!UF_CRM_1719320560331' => false, 'UF_CRM_DCT_YA_CID' => false]); | |
| echo '<pre>'; var_dump($dbLeads->SelectedRowsCount()); echo '</pre>'; | |
| while($arLead = $dbLeads->GetNext()) { | |
| echo '<pre>'; var_dump($arLead['ID'], $arLead['UF_CRM_1719320560331']); echo '</pre>'; | |
| //$GLOBALS["USER_FIELD_MANAGER"]->Update("CRM_LEAD", $arLead['ID'], ['UF_CRM_DCT_YA_CID' => $arLead['UF_CRM_1719320560331']]); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment