StartupObject: IMetabaseObjectDescriptor;
The StartupObject property returns description of the currently started object.
The property returns description of the web form as repository object if the web form was started, or shortcut description if the web form was started via the linked shortcut.
Executing the example requires that the repository contains a web form with a button.
Add links to the Metabase and WebForms system assemblies.
Sub Button1OnClick;
Var
MDesc: IMetabaseObjectDescriptor;
Begin
MDesc := Self.StartupObject;
If MDesc.IsShortcut Then
Self.Text := "Web form was started via shortcut. Shortcut ID: " + MDesc.Id + ". Web form ID: " + MDesc.Shortcut.Id;
Else
Self.Text := "Web form started. ID: " + MDesc.Id;
End If;
End Sub Button1OnClick;
After executing the example the web form title displays information about the currently started object.
See also: