CCrmFields::DeleteField

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. CCrmFields
  4. DeleteField
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/classes/general/crm_fields.php
  • Класс: \CCrmFields
  • Вызов: CCrmFields::DeleteField
public function DeleteField($ID)
{
	$obUserField = new CUserTypeEntity();
	@set_time_limit(0);
	$this->cdb->StartTransaction();
	if (!$obUserField->Delete($ID))
	{
		$this->cdb->Rollback();

		$this->SetError(array('id' => 'DELETE_ENTITY_ID', 'text' => GetMessage('CRM_FIELDS_ERROR_DELETE_ENTITY_ID')));

		return false;
	}
	$this->cdb->Commit();

	UserFieldHistory::processRemoval(CCrmOwnerType::ResolveIDByUFEntityID($this->sUFEntityID), $ID);

	$this->arUFList = $this->GetUserFields($this->sUFEntityID, 0, LANGUAGE_ID);

	return true;
}

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