Supported Calls
delete()describeSObjects(), query(), retrieve()
Special Access Rules
To see this object, users must have ViewAllData permissions.
Fields
| Field | Details |
|---|---|
| ActivityId |
|
| ChangedById |
|
| ChangedDate |
|
| DataType |
|
| FieldName |
|
| IsDataAvailable |
|
| NewValueDateTime |
|
| NewValueNumber |
|
| NewValueText |
|
| OldValueDateTime |
|
| OldValueNumber |
|
| OldValueText |
|
| Operation |
|
Indexed Fields
When you're querying ActivityFieldHistory with SOQL, you must specify indexed fields in the WHERE clause filter starting from the first field defined in the index. If you specify a partial list of indexed fields, don't leave any gaps between indexed fields after the first field. Here are the indexed fields for ActivityFieldHistory, listed from first to last in the index order.
1. ActivityId
2. ChangedDate
3. ChangedById
4. FieldName
5. ActivityFieldChange
For example, this SOQL query succeeds because the first three indexed fields are in the WHERE clause.
SELECT ActivityId, OldValueText, NewValueText, FieldName, ChangedDate FROM ActivityFieldHistory WHERE ActivityId = 'SomeId' AND ChangedDate >= :startDate AND ChangedDate <= :endDate ORDER BY ChangedDate
If you remove the ActivityId field from the WHERE clause, the query fails.
SELECT ActivityId, OldValueText, NewValueText, FieldName, ChangedDate FROM ActivityFieldHistory WHERE ChangedDate >= :startDate AND ChangedDate <= :endDate ORDER BY ChangedDate