CAllCrmDeal::GetFieldsInfo

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. CAllCrmDeal
  4. GetFieldsInfo
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/classes/general/crm_deal.php
  • Класс: \CAllCrmDeal
  • Вызов: CAllCrmDeal::GetFieldsInfo
static function GetFieldsInfo()
{
	if (self::$FIELD_INFOS)
	{
		return self::$FIELD_INFOS;
	}

	self::$FIELD_INFOS = array(
		'ID' => array(
			'TYPE' => 'integer',
			'ATTRIBUTES' => array(CCrmFieldInfoAttr::ReadOnly)
		),
		'TITLE' => array(
			'TYPE' => 'string',
			'ATTRIBUTES' => array(CCrmFieldInfoAttr::Required)
		),
		'TYPE_ID' => array(
			'TYPE' => 'crm_status',
			'CRM_STATUS_TYPE' => 'DEAL_TYPE',
			'ATTRIBUTES' => [CCrmFieldInfoAttr::HasDefaultValue],
		),
		'CATEGORY_ID' => array(
			'TYPE' => 'crm_category',
			'ATTRIBUTES' => array(CCrmFieldInfoAttr::Immutable)
		),
		'STAGE_ID' => array(
			'TYPE' => 'crm_status',
			'CRM_STATUS_TYPE' => 'DEAL_STAGE',
			'ATTRIBUTES' => array(CCrmFieldInfoAttr::Progress)
		),
		'STAGE_SEMANTIC_ID' => array(
			'TYPE' => 'string',
			'ATTRIBUTES' => array(CCrmFieldInfoAttr::ReadOnly)
		),
		'IS_NEW' => array(
			'TYPE' => 'char',
			'ATTRIBUTES' => array(CCrmFieldInfoAttr::ReadOnly)
		),
		'IS_RECURRING' => array(
			'TYPE' => 'char'
		),
		'IS_RETURN_CUSTOMER' => array(
			'TYPE' => 'char'
		),
		'IS_REPEATED_APPROACH' => array(
			'TYPE' => 'char'
		),
		'PROBABILITY' => array(
			'TYPE' => 'integer'
		),
		'CURRENCY_ID' => array(
			'TYPE' => 'crm_currency'
		),
		'OPPORTUNITY' => array(
			'TYPE' => 'double'
		),
		'IS_MANUAL_OPPORTUNITY' => array(
			'TYPE' => 'char'
		),
		'TAX_VALUE' => array(
			'TYPE' => 'double'
		),
		'EXCH_RATE' => array(
			'TYPE' => 'double',
			'ATTRIBUTES' => array(CCrmFieldInfoAttr::Hidden)
		),
		'ACCOUNT_CURRENCY_ID' => array(
			'TYPE' => 'string',
			'ATTRIBUTES' => array(CCrmFieldInfoAttr::Hidden)
		),
		'OPPORTUNITY_ACCOUNT' => array(
			'TYPE' => 'double',
			'ATTRIBUTES' => array(CCrmFieldInfoAttr::Hidden)
		),
		'TAX_VALUE_ACCOUNT' => array(
			'TYPE' => 'double',
			'ATTRIBUTES' => array(CCrmFieldInfoAttr::Hidden)
		),
		'COMPANY_ID' => array(
			'TYPE' => 'crm_company',
			'SETTINGS' => [
				'parentEntityTypeId' => \CCrmOwnerType::Company,
			],
		),
		'CONTACT_ID' => array(
			'TYPE' => 'crm_contact',
			'ATTRIBUTES' => array(CCrmFieldInfoAttr::Deprecated)
		),
		'CONTACT_IDS' => array(
			'TYPE' => 'crm_contact',
			'ATTRIBUTES' => array(CCrmFieldInfoAttr::Multiple)
		),
		'QUOTE_ID' => array(
			'TYPE' => 'crm_quote',
			'ATTRIBUTES' => array(CCrmFieldInfoAttr::ReadOnly),
			'SETTINGS' => [
				'parentEntityTypeId' => \CCrmOwnerType::Quote,
			],
		),
		'BEGINDATE' => array(
			'TYPE' => 'date',
			'ATTRIBUTES' => [CCrmFieldInfoAttr::HasDefaultValue],
		),
		'CLOSEDATE' => array(
			'TYPE' => 'date',
			'ATTRIBUTES' => [CCrmFieldInfoAttr::HasDefaultValue],
		),
		'OPENED' => array(
			'TYPE' => 'char'
		),
		'CLOSED' => array(
			'TYPE' => 'char'
		),
		'COMMENTS' => array(
			'TYPE' => 'string',
			'VALUE_TYPE' => 'html',
		),
		'ASSIGNED_BY_ID' => array(
			'TYPE' => 'user',
		),
		'CREATED_BY_ID' => array(
			'TYPE' => 'user',
			'ATTRIBUTES' => array(CCrmFieldInfoAttr::ReadOnly)
		),
		'MODIFY_BY_ID' => array(
			'TYPE' => 'user',
			'ATTRIBUTES' => array(CCrmFieldInfoAttr::ReadOnly)
		),
		'MOVED_BY_ID' => [
			'TYPE' => 'user',
			'ATTRIBUTES' => [CCrmFieldInfoAttr::ReadOnly],
		],
		'DATE_CREATE' => array(
			'TYPE' => 'datetime',
			'ATTRIBUTES' => array(CCrmFieldInfoAttr::ReadOnly)
		),
		'DATE_MODIFY' => array(
			'TYPE' => 'datetime',
			'ATTRIBUTES' => array(CCrmFieldInfoAttr::ReadOnly)
		),
		'MOVED_TIME' => [
			'TYPE' => 'datetime',
			'ATTRIBUTES' => [CCrmFieldInfoAttr::ReadOnly],
		],
		'SOURCE_ID' => array(
			'TYPE' => 'crm_status',
			'CRM_STATUS_TYPE' => 'SOURCE'
		),
		'SOURCE_DESCRIPTION' => array(
			'TYPE' => 'string'
		),
		'LEAD_ID' => array(
			'TYPE' => 'crm_lead',
			'ATTRIBUTES' => array(CCrmFieldInfoAttr::ReadOnly),
			'SETTINGS' => [
				'parentEntityTypeId' => \CCrmOwnerType::Lead,
			],
		),
		'ADDITIONAL_INFO' => array(
			'TYPE' => 'string'
		),
		'LOCATION_ID' => array(
			'TYPE' => 'location'
		),
		'ORIGINATOR_ID' => array(
			'TYPE' => 'string'
		),
		'ORIGIN_ID' => array(
			'TYPE' => 'string'
		),
	);

	// add utm fields
	self::$FIELD_INFOS += UtmTable::getUtmFieldsInfo();
	self::$FIELD_INFOS += Crm\Service\Container::getInstance()->getParentFieldManager()->getParentFieldsInfo(\CCrmOwnerType::Deal);

	self::$FIELD_INFOS += self::getLastActivityAdapter()->getFieldsInfo();

	return self::$FIELD_INFOS;
}

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