• Модуль: rpa
  • Путь к файлу: ~/bitrix/modules/rpa/lib/command/update.php
  • Класс: BitrixRpaCommandUpdate
  • Вызов: Update::save
protected function save(): Result
{
	if(!$this->isItemChanged())
	{
		return new Result();
	}
	if($this->userId > 0)
	{
		$this->item->setUpdatedBy($this->userId);
		if($this->item->isChanged('STAGE_ID'))
		{
			$this->item->setMovedBy($this->userId);
		}
	}
	$this->item->setUpdatedTime(new DateTime());
	if($this->item->isChanged('STAGE_ID'))
	{
		$this->item->setMovedTime(new DateTime());
	}

	if (!$this->isCheckFieldsEnabled())
	{
		/** @var PrototypeItem $dataClass */
		$dataClass = $this->item->sysGetEntity()->getDataClass();
		$dataClass::disableUserFieldsCheck();
	}

	return $this->item->save();
}