Creates Softadmin® Menu items.
Expects two temp tables created using SoftadminGuide.MenuItem_Definition and SoftadminGuide.MenuItemFieldTable_Definition.
SELECT * INTO #MenuItem FROM SoftadminGuide.MenuItem_Definition();
DECLARE @MenuItemGuid uniqueidentifier = NEWID();
INSERT INTO #MenuItem
(
MenuItemGuid,
Component,
MenuItemName,
SystemFunctionBlockId,
MenuGroupGuid,
MenuSubgroupGuid,
ComponentProcedureName,
HideMenuitem,
InsertUpdateProcedureName,
IdParameterName
)
SELECT
@MenuItemGuid,
'Delete',
'Delete car',
SoftadminGuide.SystemFunctionBlockId_GetFromTableName('MySchema.Car'),
@MenuGroupGuid, -- An existing menu group
@MenuSubgroupGuid, -- An existing menu subgroup
'MySchema.Car_Delete',
1,
NULL,
'CarId';
SELECT * INTO #MenuItemFieldTable FROM SoftadminGuide.MenuItemFieldTable_Definition();
INSERT INTO #MenuItemFieldTable
(
MenuItemGuid,
FieldTable
)
VALUES
(
@MenuItemGuid,
'MySchema.Car'
);
EXEC SoftadminGuide.MenuItem_Create
@UserId = @UserId;
Identifies the menu item.
Component type
Possible value | Description |
---|---|
Delete | |
Edit | NewEdit in component mode "Edit". |
Grid | |
New | NewEdit in component mode "New". |
Name of menu item.
All menu items must be part of a menu group.
A menu item may be part of a subgroup.
Has no meaning if HideMenuItem = 1.
Stored procedure used by the menu item. Usage depends on the component.
Set to 0 to list the menu item in the menu group.
The only guide-supported component that used the InsertUpdate-procedure is NewEdit ('New' and 'Edit').
Only used by NewEdit and Delete.
Name of the identifying parameter passed to the procedures of the NewEdit and Delete components.
The menu item to set field table for.
Field table.