IRdsDictionaryElementDependents.Edit

Syntax

Edit: IRdsDictionaryElementDependents;

Description

The Edit method opens the collection of dependencies on the element for edit.

Comments

Use the IRdsDictionaryElementDependents.Save method to save changes in the collection of dependencies.

Example

Executing the example requires an MDM repository with the RDS identifier. The MDM dictionary with the Country identifier is created in this repository. Tracking links to elements is enabled for a dictionary.

Sub UserProc;
Var
    MB: IMetabase;
    Dict: IRdsDictionary;
    Elements: IRdsDictionaryElements;
    Depends: IRdsDictionaryElementDependents;
    MBDepend: IMbElementDependencies;
Begin
    MB := MetabaseClass.Active;
    Dict := MB.ItemByIdNamespace("Country", MB.GetObjectKeyById("RDS")).Bind As IRdsDictionary;
    Elements := (Dict.Open(NullAs IRdsDictionaryInstance).Elements;
    Depends := Elements.Dependents(Elements.Element(1));
    If Not Depends.IsEmpty Then
        Depends.Edit;
        MBDepend := Depends.Objects As IMbElementDependencies;
        MBDepend.Clear;
        Depends.Save;
    End If;
End Sub UserProc;

On executing the example, availability of dependencies on the specified element of the MDM dictionary is checked. If dependencies exist, they are removed.

See also:

IRdsDictionaryElementDependents