Creates a managed form (metadata XML + Form.xml + Module.bsl) and registers it in the root XML of the configuration object (Document, Catalog, InformationRegister, etc.).
Usage
/form-add <ObjectPath> <FormName> [-Purpose <Purpose>] [-Synonym <Synonym>] [-SetDefault]
| Parameter | Required | Default | Description |
|---|---|---|---|
| ObjectPath | yes | — | Path to the object's XML file (Documents/Doc.xml) |
| FormName | yes | — | Form name (DocumentForm) |
| Purpose | no | default form of the kind | Form purpose — see the table below: for a catalog it is the object form, for an information register it is the record form, for a journal it is the list form |
| Synonym | no | = FormName | Form synonym |
| -SetDefault | no | auto | Make it the default. Without the flag, the first form of each purpose becomes the default |
Command
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/form-add.ps1" -ObjectPath "<ObjectPath>" -FormName "<FormName>" [-Purpose "<Purpose>"] [-Synonym "<Synonym>"] [-SetDefault]
Purpose — form purpose
| Purpose | Which form | Becomes the default |
|---|---|---|
| Object | object form (of an item, document, data processor) | yes |
| List | list form | yes |
| Choice | choice form | yes |
| Folder | group form | yes |
| FolderChoice | group choice form | yes |
| Record | record form | yes |
| RecordSet | record set form | no — the platform has no such property |
| Save | settings save form | yes |
| Load | settings load form | yes |
| Custom | arbitrary form, without binding to an object | no |
What is available for the object type
| Object type | Purposes |
|---|---|
| Catalog, ChartOfCharacteristicTypes | Object, Folder, List, Choice, FolderChoice, Custom |
| Document, ChartOfAccounts, ChartOfCalculationTypes, ExchangePlan, BusinessProcess, Task | Object, List, Choice, Custom |
| DataProcessor, Report, ExternalDataProcessor, ExternalReport | Object, Custom |
| InformationRegister | Record, List, RecordSet, Custom |
| AccumulationRegister, AccountingRegister, CalculationRegister | List, RecordSet, Custom |
| DocumentJournal, FilterCriterion | List, Custom |
| Enum | List, Choice, Custom |
| SettingsStorage | Save, Load, Custom |
| Table (external source table) | tableDataType=ObjectData — Object, List, Choice, Custom; NonobjectData — Record, List, Choice, Custom |
An invalid combination is rejected with a list of those available for this type. A constant has no forms of its own — a common form is used for it (CommonForm).
An external source table is addressed by a table file:
ExternalDataSources/<Источник>/Tables/<Таблица>.xml. References in such a form are three-part;
without -Purpose the object form is taken, and for a table with a composite key — the record form.
Examples
# Форма документа
/form-add Documents/АвансовыйОтчет.xml ФормаДокумента -Purpose Object
# Форма списка каталога
/form-add Catalogs/Контрагенты.xml ФормаСписка -Purpose List
# Форма записи регистра сведений
/form-add InformationRegisters/КурсыВалют.xml ФормаЗаписи -Purpose Record
# Форма выбора с синонимом
/form-add Catalogs/Номенклатура.xml ФормаВыбора -Purpose Choice -Synonym "Выбор номенклатуры"
# Установить как форму по умолчанию
/form-add Documents/Заказ.xml ФормаДокументаНовая -Purpose Object -SetDefault
Workflow
/form-add— create the form skeleton/form-compileor/form-edit— populate Form.xml with elements/form-validate— check correctness/form-info— analyze the result