Add a menu item
Updated
A new dictionary, document, register, virtual total, report, user command, or form is unreachable without a menu item. The table exists. The user only gets there through the metadata designer.
Note
Menu/menu.jsonis an authoritative collection: an item you delete from the file is deleted from the database. Do not remove someone else's item. Do not change existingmetaIdvalues.
How to#
Edit your model's Menu/menu.json. Items without templateMetaId are the
model's own menu — visible to everyone on top of any interface template.
Hang every object item off the kind subgroup (Dictionaries, Documents,
Registers, Reports), not off the model's root group. The ribbon draws one
nesting level as columns inside the model's tab. A subgroup inside a subgroup
is not drawn as a column.
{
"name": "Customer",
"caption": { "en": "Customers", "ru": "Customers" },
"targetType": "Dictionary",
"targetMetaId": "<dictionary guid>",
"parentMetaId": "<Dictionaries subgroup guid>",
"displayOrder": 1,
"metaId": "<new guid>",
"modelId": "<your model guid>"
}
If the kind subgroup does not exist yet, add it first (targetType: "Group",
parentMetaId = the model's root group). Create only the subgroups you will
use.
Grafting an item into another model's group is an
extension: declare the dependency, set
parentMetaId to their group, bump your version.
A dictionary command does not need a menu item — the button appears on the card.
Tip
The coverage gate fails an object with no menu item. An intentional exception is an entry in
EXEMPT_OBJECTSof that check, with a reason. Test models are already exempt.
Bump modelVersion in the same change.
What's not there yet#
Deleting a file from the folder does not delete the object from the
database (menu items and dependencies edges are the exceptions). Remove an
object in the designer, where the cascade and the impact preview run.