IMetabase.ElementDependenciesDatabase

Syntax

ElementDependenciesDatabase: IMbElementDependenciesDatabase;

Description

The ElementDependenciesDatabase property returns an object meant for working with object dependencies on MDM dictionary elements.

Comments

To check whether it is possible to work with dependencies, use the IMbElementDependenciesDatabase.Active property.

Example

Executing this example requires that the repository contains a regular report with the Report_1 identifier. This report uses any data sources that are based on MDM dictionaries. Tracking of dependencies on MDM dictionary elements is activated for the report and dictionaries.

Add a link to the Metabase system assembly.

Sub UserProc;
Var
    MB: IMetabase;
    DepDB: IMbElementDependenciesDatabase;
    Template: IMbElementDependencyTemplate;
    Depends: IMbElementDependencies;
    Depend: IMbElementDependency;
    Dict: IRdsDictionary;
    Elements: IRdsDictionaryElements;
Begin
    MB := MetabaseClass.Active;
    DepDB := MB.ElementDependenciesDatabase;
    Template := New MbElementDependencyTemplateClass.CreateByObject(MB.GetObjectKeyById("Report_1"));
    Depends := DepDB.Select_(Template);
    Debug.WriteLine("Object dependencies");
    For Each Depend In Depends Do
        Dict := Depend.Dictionary.Bind As IRdsDictionary;
        Debug.Write("Dictionary: " + Depend.Dictionary.Name);
        Elements := Dict.Open(Null).Elements;
        Debug.WriteLine("; Element: " + Elements.Name(Depend.ElementKey));
    End For;
End Sub UserProc;

Information about regular report dependencies on MDM dictionaries elements is obtained when executing the example. Names of dictionaries and elements are displayed in a development environment console.

See also:

IMetabase