Bitrix\Crm\Field Object
(
[name:protected] => INDUSTRY
[type:protected] => crm_status
[title:protected] => Сфера деятельности
[attributes:protected] => Array
(
[0] => HAS_DEFAULT_VALUE
)
[settings:protected] => Array
(
)
[userField:protected] => Array
(
)
[crmStatusType:protected] => INDUSTRY
[valueType:protected] =>
)
use Bitrix\Crm\Service;
$instanceOfCRM = Service\Container::getInstance();
$factoryDeal = $instanceOfCRM->getFactory(2);
$factoryCompany = $instanceOfCRM->getFactory(4);
$Deal = $factoryDeal->getItem($DEAL_ID);
$COMPANY_ID = $Deal->get('COMPANY_ID');
$Company = $factoryCompany->getItem($COMPANY_ID);
$Status = new CCrmStatus('INDUSTRY');
$CompanyINDUSTRY = ($Status->GetStatusByStatusId($Company->get('INDUSTRY')))['NAME'];
$CompanyINDUSTRY = ($CompanyINDUSTRY) ?: 'Сфера деятельности не указана';
$list=CRest::call("crm.status.list",
[
'order'=>['SORT'=>'ASC'],
'filter'=>["ENTITY_ID"=>'INDUSTRY']
]
);
Array
(
[result] => Array
(
[0] => Array
(
[ID] => 69
[ENTITY_ID] => INDUSTRY
[STATUS_ID] => IT
[NAME] => Сельское хозяйство
[NAME_INIT] =>
[SORT] => 10
[SYSTEM] => N
[CATEGORY_ID] =>
[COLOR] =>
[SEMANTICS] =>
)
[1] => Array
(
[ID] => 71
[ENTITY_ID] => INDUSTRY
[STATUS_ID] => TELECOM
[NAME] => Добывающая
[NAME_INIT] =>
[SORT] => 20
[SYSTEM] => N
[CATEGORY_ID] =>
[COLOR] =>
[SEMANTICS] =>
)
...