ActivityFieldHistory
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.
1SELECT ActivityId, OldValueText, NewValueText, FieldName, ChangedDate
2FROM ActivityFieldHistory
3WHERE ActivityId = 'SomeId' AND ChangedDate >= :startDate AND ChangedDate <= :endDate
4ORDER BY ChangedDateIf you remove the ActivityId field from the WHERE clause, the query fails.
1SELECT ActivityId, OldValueText, NewValueText, FieldName, ChangedDate
2FROM ActivityFieldHistory
3WHERE ChangedDate >= :startDate AND ChangedDate <= :endDate
4ORDER BY ChangedDate