OpenChangesHistoryLog: IChangesHistoryAuditLog;
The OpenChangesHistoryLog method returns the object version log within the current session.
The log will contain the record corresponding to repository connection. To execute the method, the user must have the View Access Protocol privilege.
Add links to the Dal and Metabase system assemblies.
Sub UserProc;
Var
Mb: IMetabase;
Security: IMetabaseSecurity;
AL: IAuditLog;
History: IChangesHistoryAuditLog;
Lic: Object;
Begin
Mb := MetabaseClass.Active;
// Get license to be able to work with the security manager
Lic := Mb.RequestLicense(UiLicenseFeatureType.Adm);
Security := Mb.Security;
// Open access protocol
AL := Security.OpenAuditLog;
// Get object version log
History := AL.OpenChangesHistoryLog;
// Display information from the log in the development environment console
While Not History.Eof Do
Debug.WriteLine(History.ObjectName + '(' + History.ObjectId + ", class: " + History.ObjectClass.ToString + ')' + " - " + History.Name + ". " +
DateTime.FromDouble(History.Stamp).ToString + '|' +
History.Station + '|' +
History.UserIP + '|' + History.UserName + '|' + History.UserOS);
History.Next;
End While;
// Check in license
Lic := Null;
End Sub UserProc;
After executing the example the development environment console displays the records contained in the version log and executed within the current session.
See also:
Defect 353945