The Field History Configuration editor is used to enable and configure CopyStorm field history tracking.
CopyStorm field history tracking supports the tracking of nearly all field changes in every Salesforce object.
If the “Track Field History” checkbox is selected, the default behavior is to track all changes to all fields. To limit field history tracking or to customize retention periods for field history changes, click on the “Edit” button for advanced Field History configuration.
Field history changes are kept in a database table named “CopyForceFieldHistory”. For details see:
Field History Editor
Field History is controlled by three major elements:
- Whitelist — A Whitelist controls which tables (and optionally fields) participate in field history. An unlimited # of white lists can be defined.
- Blacklist — A Blacklist controls which tables DO NOT participate in field history
- # Retention Days — Retention Days controls how many days CopyStorm should keep field history. This can be control on a per table basis and can range from 1 day to forever.
To setup Field History rules there are several decisions to make:
- Do I want to control what tables are backed up using a Whitelist or Blacklist approach?
- By default, how many days should field history records age before they are automatically deleted by CopyStorm?
- Are there any tables whose field history records I want to keep longer (or shorter) than the default?
The Field History Editor has several major components:
- Global Parameters specify constraints applied to all rules.
- The Whitelist/Blacklist editor indicates which tables should (or should not) participate in field history tracking.
There are several global field history parameters.
- Include Formula Columns parameter controls where changes to formula fields are recorded as field history changes. The default is false.
- The Exclude Audit Fields parameter restricts common Salesforce auditing fields from being records in field history. There are several reasons to exclude an audit field.
- A field is a timestamp field that changes on every record change.
- A field is Salesforce maintained formula field (example: LastViewedDate)
- A field is also recorded as separate column in CopyStorm’s field history table.
To change the list of excluded audit fields click on the Edit… link the left of the field label.
The Whitelist/Blacklist part of the editor is used to manage what tables participate in field history tracking.
- The Whitelist indicates what tables should participate in field history tracking. If the whitelist is empty this means that all tables except those in the blacklists will be tracked.
- The Blacklist indicates what tables should not participate in field history tracking.
Of course, in practice either the whitelist or blacklist is used but not both. When the white list is not empty the blacklist is effectively ignored.
Before configuration the editor looks like:
Select specific tables and/or table patterns to add to the white list by clicking on the appropriate button.
If the default field retention rule is too short (or long) for specific tables, an extra white can be added to change the retention rule. The example below changes the retention rule for Account and Contact to 1000 days.
Limit Fields Subject to Tracking
It is possible to limit the fields tracked for a specific table by edit the table’s rule. Of course, doing this means that any new fields added to a table will not be tracked by default.
The following image illustrates how to limit the fields tracked for the Account table.