EditDictionary Command

Purpose

Opens an MDM dictionary for edit.

Parameters of Use

Command parameters are passed in the Data property. Executing the command requires to specify the following value in the property:

Value type Description
IRdsDictionary MDM dictionary (composite MDM dictionary) to be opened for edit.

Application Features

The command can be executed only for MDM dictionaries (composite and table MDM dictionaries).

Example

Executing the example requires a form and a button named Button1 on the form. The repository contains a MDM repository with the NSI_1 identifier, and this repository contains the Dict_1 dictionary.

    Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
    Var
        MB: IMetabase;
        NSI: IRdsDictionary;
        Target: IUiCommandTarget;
        Context: IUiCommandExecutionContext;
    Begin
        MB := MetabaseClass.Active;
        NSI := MB.ItemByIdNamespace("Dict_1", MB.ItemById("NSI_1").Key).Bind As IRdsDictionary;
        Target := WinApplication.Instance.GetPluginTarget("Rds");
        Context := Target.CreateExecutionContext;
        Context.Data := NSI;
        Target.Execute("EditDictionary", Context);
    End Sub Button1OnClick;

Clicking the button opens the Dict_1 MDM dictionary for edit.

See also:

IUiCommandTarget.Execute