ItemByIdNamespace(Id: String; Namespace_: Integer): IMetabaseObjectDescriptor;
Id. Object identifier which description is to be obtained.
Namespace_. Container object key. The following repository objects: MDM repository, modeling container, Web application may be as a container object. Also different objects can be specified, the internal objects of which are not displayed in the object navigator (for example time series database, custom classes container, dictionaries and others).
The ItemByIdNamespace property returns description of the object that any object-container contains.
This property is used to access inner objects (for example, selection scheme of dictionaries), as well as child objects that are stored in objects-containers.
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 MDM repository with the RDS identifier where 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 editing.
See also: