LeadContactTable::getLeadContactIDs

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. LeadContactTable
  4. getLeadContactIDs
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/binding/leadcontact.php
  • Класс: Bitrix\Crm\Binding\LeadContactTable
  • Вызов: LeadContactTable::getLeadContactIDs
static function getLeadContactIDs($leadID)
{
	$leadID = (int)$leadID;
	if($leadID <= 0)
	{
		throw new Main\ArgumentException('Must be greater than zero', 'leadID');
	}

	$dbResult = Main\Application::getConnection()->query(
	/** @lang text*/
		"SELECT CONTACT_ID FROM b_crm_lead_contact WHERE LEAD_ID = {$leadID} ORDER BY SORT ASC"
	);

	$results = array();
	while($ary = $dbResult->fetch())
	{
		$results[] = (int)$ary['CONTACT_ID'];
	}
	return $results;
}

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