IMetabaseObjectDescriptor.GetHistory

Syntax

GetHistory: IMetabaseObjectHistory;

Description

The GetHistory method returns a history of changing the object.

Comments

To keep a history, one needs to activate this function for the particular type of objects in the security manager auditing or one needs to activate auditing for the particular object and for the particular user in the security manager navigator.

Example

Executing the example requires that the repository contains a regular report with the REPORT identifier. Operation history is enabled for regular reports in the security manager.

Add links to the Metabase system assembly.

Sub UserProc;
Var
    MB: IMetabase;
    Desc: IMetabaseObjectDescriptor;
    History: IMetabaseObjectHistory;
    Item: IMetabaseObjectHistoryItem;
    i: Integer;
Begin
    MB := MetabaseClass.Active;
    Desc := Mb.ItemById("REPORT");
    History := Desc.GetHistory;
    For i := 0 To History.Count - 1 Do
        Item := History.Item(i);
        Debug.WriteLine(Item.Id + " " + Item.Name + " " + DateTime.FromDouble(Item.Stamp).ToString);
    End For;
End Sub UserProc;

After executing the example the development environment console displays object operation history. Identifiers, names, date and time of objects changing are also displayed.

See also:

IMetabaseObjectDescriptor