All docs
V20.2
20.2
20.1
19.2
The page you are viewing does not exist in version 19.2. This link will take you to the root page.
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

Change Object Auditing Mode

The Audit Trail System supports several object auditing modes.

Mode Description
Full All object changes are fully audited. This mode is the default.
Lightweight Only object creation, deletion and modification are audited. This mode does not audit names and values of changed properties.
CreationOnly Only object creation is audited. Intended for data import purposes.

To change the current object auditing mode, set the AuditTrailService.Instance.ObjectAuditingMode property to one of the ObjectAuditingMode enumeration values. The following code demonstrates how this can be implemented.

XAF Windows Forms Application - Program.cs (Program.vb) file:

static void Main() {
    MySolutionWindowsFormsApplication application = new MySolutionWindowsFormsApplication();
    // ...
    AuditTrailService.Instance.ObjectAuditingMode = ObjectAuditingMode.Lightweight;
    application.Setup();
    application.Start();
    //...
}

XAF ASP.NET Application - Global.asax.cs (Global.asax.vb) file:

protected void Session_Start(object sender, EventArgs e) {
    WebApplication.SetInstance(Session, new MySolutionWebApplication());
    AuditTrailService.Instance.ObjectAuditingMode = ObjectAuditingMode.Lightweight;
    //...
    WebApplication.Instance.Setup();
    WebApplication.Instance.Start();
}