Excluding fields from auditing

For each entity type (or even each entity), use the following extension to specify the fields to be excluded from AuditTrail capture:
sub atCust_ExcludeField {
    my ($session, $entity, $fieldName) = @_;
    # Return 1 for the Description field (excluding it from the audit
    # trail history). Return 0 for any other field.
    return ($fieldName eq "Description");
} 
Arguments:
  • $session: the current session object.
  • $entity: the entity object for which an audit trail is being written.
  • $fieldName: the name of the field to be excluded from the audit trail.
Return values: 0 to keep the field in the audit trail; nonzero to exclude it.

When a change to a record affects only excluded fields, the package still records the user name, the time of the change, and the state information for the record.