IMetabaseObjectDescriptor.IsShortcut

Syntax

IsShortcut: Boolean;

IsShortcut: boolean;

Description

The IsShortcut property returns whether this object is a shortcut to other repository object.

The property returns True if this object is a shortcut for another repository object.

NOTE. If the object is a shortcut for object from another repository, this property returns the False value, the IMetabaseObjectDescriptor.IsLink property should also be used for check.

Example

Executing the example requires that the repository contains an object with the ObjTest identifier.

Add a link to the Metabase system assembly.

Sub UserProc;
Var
    MB: IMetabase;
    MDesc: IMetabaseObjectDescriptor;
Begin
    MB := MetabaseClass.Active;
    MDesc := MB.ItemById("ObjTest");
    If MDesc.IsShortcut Then
        Debug.WriteLine(MDesc.Shortcut.Id);
    End If;
End Sub UserProc;
Public Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    MDesc: IMetabaseObjectDescriptor;
Begin
    MB := Params.Metabase;
    MDesc := MB.ItemById["ObjTest"];
    If MDesc.IsShortcut Then
        System.Diagnostics.Debug.WriteLine(MDesc.Shortcut.Id);
    End If;
End Sub;

After executing this example, if the ObjTest object is a shortcut, the identifier of the object to which this shortcut refers, is displayed in the development environment console.

See also:

IMetabaseObjectDescriptor