E
E
Eugene2020-07-01 22:19:55
1C-Bitrix
Eugene, 2020-07-01 22:19:55

How to update only the ACTIVE field of an infoblock element?

I do this, but at the same time properties fly off

$el = new CIBlockElement;
$el->Update($ID, ['ACTIVE' => 'N'])

is there some way to update only the active field and keep the previous values?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
PetrPo, 2020-07-02
@Nc_Soft

If you do not update props, then when updating fields, they should not be overwritten. You have an OnBeforeIBlockElementUpdate handler somewhere (probably in init.php or some third-party module)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question