CCrmUserFieldRestProxy::get

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. CCrmUserFieldRestProxy
  4. get
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/classes/general/restservice.php
  • Класс: \CCrmUserFieldRestProxy
  • Вызов: CCrmUserFieldRestProxy::get
public function get($ID)
{
	$ufId = (int)$ID;
	if ($ufId > 0 && $this->entityID === CCrmInvoice::GetUserFieldEntityID() && parent::checkReadPermission())
	{
		$invoiceReservedFields = array_fill_keys(CCrmInvoice::GetUserFieldsReserved(), true);

		$entity = new \CUserTypeEntity();
		$result = $entity->GetByID($ID);
		if (is_array($result) && isset($result['FIELD_NAME'])
			&& isset($invoiceReservedFields[$result['FIELD_NAME']]))
		{
			throw new RestException("The entity with ID '{$ID}' is not found.", RestException::ERROR_NOT_FOUND);
		}
	}

	return parent::get($ID);
}

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