Call::checkFields

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. Call
  4. checkFields
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/activity/provider/call.php
  • Класс: Bitrix\Crm\Activity\Provider\Call
  • Вызов: Call::checkFields
static function checkFields($action, &$fields, $id, $params = null)
{
	$result = new Main\Result();

	if (empty($fields['PROVIDER_TYPE_ID']))
	{
		$fields['PROVIDER_TYPE_ID'] = static::ACTIVITY_PROVIDER_TYPE_CALL;
	}

	//Only START_TIME can be taken for DEADLINE!
	if ($action === self::ACTION_UPDATE)
	{
		if (isset($fields['START_TIME']) && $fields['START_TIME'] !== '')
		{
			$fields['DEADLINE'] = $fields['START_TIME'];
		}
		elseif (isset($fields['~START_TIME']) && $fields['~START_TIME'] !== '')
		{
			$fields['~DEADLINE'] = $fields['~START_TIME'];
		}
	}

	return $result;
}

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