ItemByIdNamespace(Id: String; Namespace_: Integer): IMetabaseObjectDescriptor;
Id. Object identifier, which description should be obtained.
Namespace_. Container object key. The following repository objects can be specified as as container objects: MDM repository, modeling container, web application. Also, different objects can be specified, which internal objects are not displayed in the object navigator (for example, time series database, custom class container, dictionaries and others).
The ItemByIdNamespace property returns description of the object contained in a container object.
This property is used to access internal objects (for example, selection schema of dictionaries), as well as child objects that are stored in container objects.
The property returns Null if an object with the specified identifier does not exist.
Executing the example requires a form and a button named Button1 on it. The repository contains an MDM repository with the RDS identifier where an MDM dictionary with the Dict_1 identifier is stored.
Add links to the Metabase, Rds, Ui system assemblies.
Sub UserProc;
Var
MB: IMetabase;
RDS: IRdsDictionary;
Target: IUiCommandTarget;
Context: IUiCommandExecutionContext;
Begin
MB := MetabaseClass.Active;
RDS := MB.ItemByIdNamespace("Dict_1", MB.GetObjectKeyById("RDS")).Bind As IRdsDictionary;
If RDS <> Null Then
Target := WinApplication.Instance.GetPluginTarget("Rds");
Context := Target.CreateExecutionContext;
Context.Data := RDS;
Target.Execute("EditDictionary", Context);
End If;
End Sub UserProc;
Clicking the button opens the specified MDM dictionary for edit.
See also: