Answer the question
In order to leave comments, you need to log in
How to prohibit some changes to elements when unloading from a 1C site?
To prevent updating fields on an element, I do this:
AddEventHandler("iblock", "OnBeforeIBlockElementUpdate","DoNotUpdate");
function DoNotUpdate(&$arFields)
{
if ($_REQUEST['mode']=='import')
{
unset($arFields['PREVIEW_PICTURE']);
unset($arFields['DETAIL_PICTURE']);
unset($arFields['PREVIEW_TEXT']);
unset($arFields['DETAIL_TEXT']);
}
}
Answer the question
In order to leave comments, you need to log in
Why not just look at the contents of your package?
Surely there mode is not equal to "import", but something like "full_import" or "reload".
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question