CAllCrmCompany::SetDefaultResponsible

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. CAllCrmCompany
  4. SetDefaultResponsible
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/classes/general/crm_company.php
  • Класс: \CAllCrmCompany
  • Вызов: CAllCrmCompany::SetDefaultResponsible
static function SetDefaultResponsible($safe = true)
{
	global $DB;
	$tableName = CCrmCompany::TABLE_NAME;

	if($safe && !$DB->Query("SELECT ASSIGNED_BY_ID FROM {$tableName} WHERE 1=0", true))
	{
		return false;
	}

	$DB->Query(
		"UPDATE {$tableName} SET ASSIGNED_BY_ID = CREATED_BY_ID WHERE ASSIGNED_BY_ID IS NULL",
		false,
		'File: '.__FILE__.'
Line: '.__LINE__ ); return true; }

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