• Модуль: tasks
  • Путь к файлу: ~/bitrix/modules/tasks/classes/general/checklistitem.php
  • Класс: CTaskCheckListItem
  • Вызов: CTaskCheckListItem::update
public function update($fields)
{
	$this->resetCache();

	$id = $this->getId();
	$userId = $this->getExecutiveUserId();
	$currentFields = TaskCheckListFacade::getList([], ['ID' => $id])[$id];

	/** @var TaskCheckListFacade $facade */
	$facade = TaskCheckListFacade::class;
	$checkList = new CheckList(0, $userId, $facade, $currentFields);
	$checkList->setFields($fields);

	$saveResult = $checkList->save();
	if (!$saveResult->isSuccess() && $saveResult->getErrors())
	{
		/** @noinspection PhpDeprecationInspection */
		throw new TasksException(
			$saveResult->getErrors()->getMessages()[0],
			TasksException::TE_ACTION_FAILED_TO_BE_PROCESSED
		);
	}
}