• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/classes/general/crm_role.php
  • Класс: \CCrmRole
  • Вызов: CCrmRole::Add
public function Add(&$arFields)
{
	global $DB;

	$this->LAST_ERROR = '';
	$result = true;
	if(!$this->CheckFields($arFields))
	{
		$result = false;
		$arFields['RESULT_MESSAGE'] = &$this->LAST_ERROR;
	}
	else
	{
		if (!isset($arFields['RELATION']) || !is_array($arFields['RELATION']))
			$arFields['RELATION'] = array();
		$ID = (int)$DB->Add('b_crm_role', $arFields, array(), 'FILE: '.__FILE__.'
LINE: '.__LINE__); $this->SetRoleRelation($ID, $arFields['RELATION']); $result = $arFields['ID'] = $ID; } return $result; }