GetChangesHistory(Start: DateTime; End_: DateTime): IAuditOperations;
Start. Start date.
End. End date.
The GetChangesHistory method returns collection of access protocol records containing information about actions made with objects during specified period of time.
Executing the example requires that the repository contains an object with the Obj_1 identifier.
Add a link to the Metabase system assembly.
Sub UserProc;
Var
MB: IMetabase;
MDesc: IMetabaseObjectDescriptor;
Operations: IAuditOperations;
Start, End_: DateTime;
Begin
MB := MetabaseClass.Active;
MDesc := MB.ItemById("Obj_1");
End_ := DateTime.Now;
Start := DateTime.AddDays(End_, -10);
Operations := MDesc.GetChangesHistory(Start, End_);
While Not Operations.Eof Do
Debug.WriteLine(Operations.Name + " " + Operations.Logon.UserName);
Operations.Next;
End While;
End Sub UserProc;
Executing the example returns access protocol records containing list of actions with the specified object for the last ten days. The name of actions and users who made them are displayed to the development environment console.
See also: