IMetabaseAuditPolicy.TrackClassHistory

Syntax

TrackClassHistory(ClassID: Integer): Integer;

Parameters

ClassId. Object class identifier.

Description

The TrackClassHistory property determines a mask of operations for which the history will be tracked.

Comments

To define the object class, use the MetabaseObjectClass enumeration.

Foresight Analytics Platform extensions are based on custom class objects. Classes of these objects are absent in the MetabaseObjectClass enumeration but they can be obtained in the IMetabaseCustomClass.ClassId property. The custom class described by the IMetabaseCustomClass interface can be obtained in the IMetabaseCustomExtender.Classes collection.

One can also use the GetMetabaseHelper.GetCustomClassByEnum(BPClasses.<object type>) function. This function is implemented in the Repository Interaction Unit unit (P10002_METABASE_HELPER) of the Designer of Business Applications extension.

History is available only by three operations: change, changing permissions, and deleting. To create and check mask value, use the MetabaseObjectPredefinedRights enumeration. To analyze a mask value implement a custom function that enables the comparison of separate mask bits with relevant enumerations values. The example of work with access mask is given in the Working with Access Mask section.

Example

Executing the example requires the Metabase system assembly.

Sub UserProc;
Var
    MB: IMetabase;
    MS: IMetabaseSecurity;
    AuditPolicy: IMetabaseAuditPolicy;
    MBClass: Integer;
Begin
    MB := MetabaseClass.Active;
    MS := MB.Security;
    AuditPolicy := MS.Policy.AuditPolicy;
    MBClass := MetabaseObjectClass.KE_CLASS_FOLDER;
    Debug.WriteLine(AuditPolicy.TrackClassHistory(MBClass));
End Sub UserProc;

After executing the example the console displays the value that determines the operations with folders, for which the records will be added to the access protocol.

See also:

IMetabaseAuditPolicy