CCrmDealCategoryProxy::innerUpdate

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. CCrmDealCategoryProxy
  4. innerUpdate
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/classes/general/restservice.php
  • Класс: \CCrmDealCategoryProxy
  • Вызов: CCrmDealCategoryProxy::innerUpdate
protected function innerUpdate($ID, &$fields, &$errors, array $params = null)
{
	$userPermissions = \CCrmPerms::GetCurrentUserPermissions();
	if (!$userPermissions->HavePerm('CONFIG', BX_CRM_PERM_CONFIG, 'WRITE'))
	{
		$errors[] = 'Access denied.';
		return false;
	}

	if(!DealCategory::exists($ID))
	{
		$errors[] = 'Not found.';
		return false;
	}

	try
	{
		DealCategory::update($ID, $fields);
		return true;
	}
	catch(Main\SystemException $ex)
	{
		$errors[] = $ex->getMessage();
		return false;
	}
}

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