• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/order/matcher/fieldsynchronizer.php
  • Класс: Bitrix\Crm\Order\Matcher\FieldSynchronizer
  • Вызов: FieldSynchronizer::getPropsGroupId
static function getPropsGroupId($personTypeId)
{
	static $groupCache = [];

	if (empty($groupCache[$personTypeId]))
	{
		$orderProps = OrderPropsGroupTable::getRow([
			'select' => ['ID'],
			'filter' => ['=PERSON_TYPE_ID' => $personTypeId],
			'order' => ['SORT' => 'asc']
		]);

		if (!empty($orderProps))
		{
			$groupCache[$personTypeId] = $orderProps['ID'];
		}
	}

	return $groupCache[$personTypeId];
}