CCrmRestProxyBase::update

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. CCrmRestProxyBase
  4. update
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/classes/general/restservice.php
  • Класс: \CCrmRestProxyBase
  • Вызов: CCrmRestProxyBase::update
public function update($ID, &$fields, array $params = null)
{
	if(!$this->checkEntityID($ID))
	{
		throw new RestException('ID is not defined or invalid.');
	}

	$fieldsInfo = $this->getFieldsInfo();
	$this->internalizeFields(
		$fields,
		$fieldsInfo,
		array(
			'IGNORED_ATTRS' => array(
				CCrmFieldInfoAttr::Immutable,
				CCrmFieldInfoAttr::UserPKey
			)
		)
	);

	$errors = array();
	$result = $this->innerUpdate($ID, $fields, $errors, $params);
	if($result !== true)
	{
		throw new RestException(implode("\n", $errors));
	}

	return $result;
}

Добавить комментарий