Friday, April 8, 2016

[Salesforce] The Sobject Crusade: AccountHistory

Back to the Sobject Crusade list.

Source: AccountHistory

This object supports Field Tracking History on the Account object.

To track fields on the Account object, go to Setup > Accounts > Fields and click the Set History Tracking button.

Then click on the Enable Account History flag and select all fields to be tracked:




From now on the selected fields will be tracked in the Account History related list:


Here is the corresponding query:

Select Id, Field, NewValue, OldValue From AccountHistory Where AccountId = '00124000003vaBu'


History tracking has few limitations:
  • You can track upto 20 standard and custom fields per custom object
  • The field history data is retained for up to 18 months
  • Changes to fields with more than 255 characters are tracked as edited, and their old and new values are not recorded
  • Tracked field values are not automatically translated
  • Changes to custom field labels that have been translated via the Translation Workbench are shown in the locale of the user viewing the History related list
  • Changes to date fields, number fields, and standard fields are shown in the locale of the user viewing the History related list
  • If a trigger causes a change on an object the current user doesn’t have permission to edit, that change is not tracked because field history honors the permissions of the current user
  • Additional field history increases beyond your current limits require the purchase of the Field Audit Trail add-on, following the Spring '15 release

No comments:

Post a Comment