• Модуль: im
  • Путь к файлу: ~/bitrix/modules/im/lib/integration/crm/common.php
  • Класс: BitrixImIntegrationCrmCommon
  • Вызов: Common::getLink
static function getLink($type, $id = null)
{
	if (!Loader::includeModule('crm'))
	{
		return false;
	}

	$defaultValue = false;
	if (is_null($id))
	{
		$defaultValue = true;
		$id = 0;
	}

	$result = CCrmOwnerType::GetEntityShowPath(CCrmOwnerType::ResolveID($type), $id, false);

	if ($defaultValue)
	{
		$result = str_replace($id, '#ID#', $result);
	}

	return $result;
}