• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/webform/form.php
  • Класс: Bitrix\Crm\WebForm\Form
  • Вызов: Form::activate
static function activate($formId, $isActivate = true, $changeUserBy = null)
{
	$updateFields = array('ACTIVE' => $isActivate ? 'Y' : 'N');
	if($changeUserBy)
	{
		$updateFields['ACTIVE_CHANGE_BY'] = $changeUserBy;
	}
	$updateResult = Internals\FormTable::update($formId, $updateFields);
	if($updateResult->isSuccess())
	{
		(new static($formId))->buildScript();
		return true;
	}
	else
	{
		return false;
	}
}