...Человеческий поиск в разработке...
- Модуль: crm
- Путь к файлу: ~/bitrix/modules/crm/classes/general/restservice.php
- Класс: \CCrmRequisitePresetFieldRestProxy
- Вызов: CCrmRequisitePresetFieldRestProxy::checkFields
protected function checkFields($action, $presetId, $fields, &$errors) { if (!isset($fields['FIELD_NAME'])) { $errors = 'FIELD_NAME is not specified.'; return false; } elseif($action === 'ADD') { $entity = self::getEntity(); $fieldsAvailableToAdd = array(); $result = $entity->getSettingsFieldsAvailableToAdd(EntityPreset::Requisite, $presetId); if ($result->isSuccess()) { $fieldsAvailableToAdd = $result->getData(); if (!is_array($fieldsAvailableToAdd)) $fieldsAvailableToAdd = array(); } if (!in_array($fields['FIELD_NAME'], $fieldsAvailableToAdd, true)) { $errors = 'The field '. (isset($fields['FIELD_NAME']) ? "'".$fields['FIELD_NAME']."' " : ""). 'can not be added.'; return false; } } return true; }