Creates Softadmin® Links.
Expects two temp tables created using SoftadminGuide.Link_Definition and SoftadminGuide.LinkPassingField_Definition.
DECLARE @DeleteCarLinkGuid uniqueidentifier = NEWID();
SELECT * INTO #Link FROM SoftadminGuide.Link_Definition();
INSERT INTO #Link
(
LinkGuid,
MenuItemGuidFrom,
MenuItemGuidTo,
LinkType,
LinkAlias,
ShowOnlyInNavigator
)
VALUES
(
@DeleteCarLinkGuid,
@ListCars, -- An existing menu item
@EditCar, -- An existing menu item
'RowLink',
NULL,
0
)
SELECT * INTO #LinkPassingField FROM SoftadminGuide.LinkPassingField_Definition();
INSERT INTO #LinkPassingField
(
LinkGuid,
PassingFieldName,
PassingFieldType,
PassingFieldValue
)
VALUES
(
@DeleteCarLinkGuid,
'CarId',
'Column value',
'CarId'
);
EXEC SoftadminGuide.Link_Create @UserId = @UserId;
Identifies a link.
The menu item where the link is shown.
The link destination.
Type of link.
Possible value | Description |
---|---|
Row link | Row link in a grid. |
Top link |
Use only if the link is supposed to be referenced by alias.
For row links - show the link only in the navigator popup.
Set by IDENTITY-property. Must be unique even if the temp-table itself has no primary key constraint.
Identifies link to apply passing field to.
Name of passing field.
Supported values:
Value to pass. Can be name of column, parameter field, session variable et cetera depending on passing field type.