Created
July 10, 2023 16:52
-
-
Save luckydevilru/e388207e4252d7c1fe542404c66e88b3 to your computer and use it in GitHub Desktop.
добавление удаление множественного значения свойства инфоблока
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
// 1. добавление | |
$element = $agileCommandsClass::getByPrimary( | |
$agileTeam_id , | |
['select' => array('ID', 'NAME', 'USERS')] | |
)->fetchObject(); | |
$element->addToUsers(new PropertyValue(233973)); | |
$element->save(); | |
// 2. удаление из множественного значниея. | |
$element = \Bitrix\Iblock\Elements\ElementAgilecommandTable::getByPrimary( 193574 , array( // $ELEMENT_ID - id елемента | |
'select' => array('ID', 'NAME', 'USERS') | |
))->fetchObject(); | |
$element->removeFromUsers(233973); | |
$element->save(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment