CAllCrmDeal::ProcessStatusModification

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. CAllCrmDeal
  4. ProcessStatusModification
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/classes/general/crm_deal.php
  • Класс: \CAllCrmDeal
  • Вызов: CAllCrmDeal::ProcessStatusModification
static function ProcessStatusModification(array $fields)
{
	$entityID = isset($fields['ENTITY_ID']) ? $fields['ENTITY_ID'] : '';
	$statusID = isset($fields['STATUS_ID']) ? $fields['STATUS_ID'] : '';

	if(($entityID === 'DEAL_STAGE' || preg_match("/DEAL_STAGE_\d+/", $entityID) == 1) && $statusID !== '')
	{
		$categoryID = Crm\Category\DealCategory::convertFromStatusEntityID($entityID);
		Crm\Attribute\FieldAttributeManager::processPhaseModification(
			$statusID,
			\CCrmOwnerType::Deal,
			Crm\Attribute\FieldAttributeManager::resolveEntityScope(
				\CCrmOwnerType::Deal,
				0,
				array('CATEGORY_ID' => $categoryID)
			),
			Crm\Category\DealCategory::getStageInfos($categoryID)
		);
	}
}

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