QuoteContactTable::unbindAllContacts

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

	$connection = Main\Application::getConnection();
	$connection->queryExecute(
		/** @lang text */
		"DELETE FROM b_crm_quote_contact WHERE QUOTE_ID = {$quoteID}"
	);
	$connection->queryExecute(
		/** @lang text */
		"UPDATE b_crm_quote SET CONTACT_ID = NULL WHERE ID = {$quoteID}"
	);
}

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