ObjectKey(Index: Integer): Integer;
Index. Position index.
The ObjectKey property determines a key of an object for that protocol records are displayed.
The number of keys is determined by the IAuditFilterCondition.ObjectKeyCount property.
Executing the example requires that the repository contains a report with the REPORT identifier.
Add a link to the Metabase system assembly.
Sub UserProc;
Var
Mb: IMetabase;
Log: IAuditLog;
Con: IAuditFilterCondition;
Fil: IAuditFilter;
objectKey: Integer;
operations: IAuditOperations;
Lic: Object;
d: DateTime;
Begin
Mb := MetabaseClass.Active;
Lic := Mb.RequestLicense(UiLicenseFeatureType.Adm);
Log := Mb.Security.OpenAuditLog;
Fil := Log.Filter;
If Fil.Count <= 0 Then
Con := Fil.Add;
Else
Con := Fil.Item(0);
End If;
Con.IncludeFailedLogons := False;
Con.IncludeSucceededLogons := False;
objectKey := MB.ItemById("Report").Key;
Con.ObjectKeyCount := 1;
Con.ObjectKey(0) := objectKey;
operations := Log.OpenOperationTree(-1, -1);
While Not operations.Eof Do
Debug.Write(operations.Name + "; ");
d := DateTime.FromDouble(operations.Stamp);
Debug.WriteLine(d.ToString + ";");
operations.Next;
End While;
operations.Eof;
End Sub UserProc;
After executing the example, the console will display a list of operations executed over the object. Name, date and time are displayed for each operation.
See also: