Newer Version Available

This content describes an older version of this product. View Latest

FieldHistoryArchive

Represents field history values for all objects that retain field history. FieldHistoryArchive is a BigObject, available only to users with the “Retain Field History” permission. This object is available in API version 29.0 and later.

Each instance of the FieldHistoryArchive object represents a single change in the value of a field. FieldHistoryArchive stores history for both standard and custom fields.

The Field field returns the name of the field unless the parent field or object is deleted, in which case it returns the field ID. You can use the ID to retrieve the old field and object name from the FieldNameAfterArchival and ParentNameAfterArchival fields, respectively.

Supported Calls

describeSObjects()query()

Fields

Field Name Details
ArchiveFieldName
Type
string
Properties
Nillable
Description
The name of the field at the time the data was archived. If the field name changed, the name is sometimes not the same for all records related to a single field.
ArchiveParentName
Type
string
Properties
Nillable
Description
The name of the parent object at the time the data was archived. If the object name changed, the name is sometimes not the same for all records related to a single field.
ArchiveParentType
Type
string
Properties
Nillable
Description
The type of the field at the time the data was archived. If the field type changed, the type is sometimes not the same for all records related to a single field.
ArchiveTimestamp
Type
dateTime
Properties
Nillable
Description
The date and time at which the data was archived.
CreatedById
Type
reference
Properties
Nillable
Description
The user ID of the user who created the original record.
CreatedDate
Type
dateTime
Properties
Nillable, Sort
Description
The date and time at which the original record was created.
Field
Type
picklist
Properties
Filter, Nillable, Restricted picklist
Description
The name of the field that was changed. If the field is deleted from the parent object, the Field field contains the field ID instead.
FieldHistoryType
Type
picklist
Properties
Nillable, Sort, Restricted picklist
Description
The name of the object that contains the field history (for example, Account).
Id
Type
ID
Properties
Defaulted on create, Filter, idLookup
Description
The ID of the archived record. It’s useful to have a field’s ID for fields that you’ve deleted. (Field names aren’t retained in history when you delete fields from Salesforce.)
NewValue
Type
anyType
Properties
Nillable
Description
The new value of the modified field.
OldValue
Type
anyType
Properties
Nillable
Description
The previous value of the modified field.
ParentId
Type
reference
Properties
Filter, Nillable, Sort
Description
The ID of the object that contains the field (the parent object).

Usage

When sorting fields, order them as follows:
  1. FieldHistoryType ASC
  2. ParentID ASC
  3. CreatedDate DESC