Answer the question
In order to leave comments, you need to log in
How to prohibit changing the values ​​of infoblock properties in 1C Bitrix BUS?
Good afternoon!
There is a base in 1C UT and there is a site on BUS Small business.
Added the init.php file to handle the incoming directory, namely not to overwrite some values ​​in the infoblocks when importing, like this:
AddEventHandler("iblock", "OnBeforeIBlockPropertyUpdate","DoNotUpdate");
AddEventHandler("iblock", "OnBeforeIBlockSectionUpdate", "DoNotUpdateSection");
function DoNotUpdate(&$arFields){
if (@$_REQUEST['mode']=='import')
{
unset($arFields['NAME']);
}
}
function DoNotUpdateSection(&$arFields){
if (@$_REQUEST['mode']=='import')
{
unset($arFields['NAME']);
unset($arFields['CODE']);
}
}
Answer the question
In order to leave comments, you need to log in
If someone is interested in the solution, then there is no built-in solution. I solved the problem through another event
AddEventHandler('catalog', 'OnSuccessCatalogImport1C', 'customCatalogImportStep');
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question