• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/recycling/leadcontroller.php
  • Класс: Bitrix\Crm\Recycling\LeadController
  • Вызов: LeadController::prepareFields
protected function prepareFields(array $fields): array
{
	if (
		isset($fields['STATUS_ID'])
		&& !\CCrmLEad::IsStatusExists($fields['STATUS_ID'])
	)
	{
		// if old status does not exist, STATUS_ID should be empty to be defined automatically
		unset($fields['STATUS_ID']);
	}

	return $fields;
}