Shortcut: IMetabaseObjectDescriptor;
The Shortcut property determines description of the object to which the shortcut refers.
If the object is not a shortcut, this property returns Null.
NOTE. If the object is a shortcut for the object from another repository, this property returns Null. The IsLink property should be used for the check. The object to which the shortcut refer, will be available after opening of the shortcut, in the Object property.
Executing the example requires a shortcut with the SHORTCUT_TO_OBJ1 identifier that refers to any repository object. The repository also contains an object with the OBJ2 identifier.
Sub Main;
Var
MB: IMetabase;
MDesc: IMetabaseObjectDescriptor;
Begin
MB := MetabaseClass.Active;
MDesc := MB.ItemById("SHORTCUT_TO_OBJ1");
MDesc := MDesc.EditDescriptor;
MDesc.Shortcut := MB.ItemById("OBJ2");
MDesc.Name := "Shortcut for OBJ2";
MDesc.Id := "SHORTCUT_TO_OBJ2";
MDesc.SaveDescriptor;
End Sub Main;
After executing this example the name, the identifier and the object to which the SHORTCUT_TO_OBJ1 shortcut refers are changed.
See also: