Y
Y
Yuriy2020-11-19 15:36:08
1C-Bitrix
Yuriy, 2020-11-19 15:36:08

How to delete all properties of an infoblock element?

Actually a subject))
how to delete all user properties of an infoblock element without knowing their ID and External code, input data is only ELEMENT_ID and IBLOCK_ID?

so delete one by one knowing its external code or id

CIBlockElement::SetPropertyValuesEx($arData['PRODUCT_ID'], $arData['IBLOCK_ID'], array($arData['EXT_ID'] => Array ("VALUE" => array("del" => "Y"))));
but there are no input data for the property itself, i.e. we don’t know if the element has properties or not, we just need to delete or clear everything that it may or may not have.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey, 2020-11-19
@AlexeyCaTHaR

It is very sad that there is no thought on the topic = CIBlockElement::SetPropertyValues, vel somehow found a neighbor of CIBlockElement::SetPropertyValuesEx)))
This method wants a FULL list of fields and if something is missing, then the rest will be reset. How to total run once for an element

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question