---
schema_version: "1"
id: 049bdbaad93d86ff9b302ad1e278a9b856f7dc99a742c86399fbc461e66943c1
title: ActivityFieldHistory
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/object_reference/sforce_api_objects_activityfieldhistory.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_activityfieldhistory.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: f10ccf7f3c28ff192c8185e2edcbb4ab2fc31b3da0654fe4b5a6afa23efde355
description: Represents a change in a field value for a tracked object or field. This object is a big object. This object is available in API version 55.0 and later.
---
# ActivityFieldHistory

Represents a change in a field value for a tracked object or field. This object is a big object. This object is available in API version 55.0 and later.

## Supported Calls

delete()describeSObjects(), query(), retrieve()

## Special Access Rules

To see this object, users must have ViewAllData permissions.

## Fields

| Field | Details |
| --- | --- |
| ActivityId | 
Type

reference

Properties

Filter, Sort

Description

The ID of the task or event that changed.

This field is a polymorphic relationship field.

Relationship Name

Activity

Refers To

Event, Task



 |
| ChangedById | 

Type

reference

Properties

Filter, Sort

Description

The ID of the user who made the change.

This field is a relationship field.

Relationship Name

ChangedBy

Refers To

User



 |
| ChangedDate | 

Type

dateTime

Properties

Filter, Sort

Description

The date the field value changed.



 |
| DataType | 

Type

picklist

Properties

Restricted picklist

Description

The type of the field with the changed value.

Possible values are:

- Address
- AnyType
- AutoNumber
- Base64
- BitVector
- Boolean
- Content
- Currency
- DataCategoryGroupReference
- DateOnly
- DateTime
- Division
- Double
- DynamicEnum
- Email
- EncryptedBase64
- EncryptedText
- EntityId
- EnumOrId
- ExternalId
- Fax
- File
- HtmlMultiLineText
- HtmlStringPlusClob
- InetAddress
- Json
- Location
- MultiEnum
- MultiLineText
- Namespace
- Percent
- PersonName
- Phone
- Raw
- RecordType
- SfdcEncryptedText
- SimpleNamespace
- StringPlusClob
- Switchable\_PersonName
- Text
- TimeOnly
- Url
- YearQuarter





 |
| FieldName | 

Type

string

Properties

Filter, Sort

Description

The name of the field changed.



 |
| IsDataAvailable | 

Type

boolean

Properties

Defaulted on create

Description

Indicates whether valid data is available in the old and new value fields. This field is false if, for example, the fields are encrypted or the changed values are too large, such as for Description field types.

The default value is false.



 |
| NewValueDateTime | 

Type

dateTime

Properties

Nillable

Description

The new value for date type fields.



 |
| NewValueNumber | 

Type

double

Properties

Nillable

Description

The new value for number type fields.



 |
| NewValueText | 

Type

string

Properties

Nillable

Description

The new value for all other field types that are not a date or number type.



 |
| OldValueDateTime | 

Type

dateTime

Properties

Nillable

Description

Old value for date type fields.



 |
| OldValueNumber | 

Type

double

Properties

Nillable

Description

Old value for number type fields.



 |
| OldValueText | 

Type

string

Properties

Nillable

Description

The old value for all other field types that are not a date or number type.



 |
| Operation | 

Type

picklist

Properties

Restricted picklist

Description

The operation of the field value change.

Possible values are:

- delete
- update





 |

## 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

#### See Also

- [Big Objects Implementation Guide: SOQL with Big Objects](https://developer.salesforce.com/docs/atlas.en-us.264.0.bigobjects.meta/bigobjects/big_object_querying.htm "Big Objects Implementation Guide: SOQL with Big Objects - html (New Window)")
- [Big Objects Implementation Guide: Big Objects](https://developer.salesforce.com/docs/atlas.en-us.254.0.bigobjects.meta/bigobjects/big_object.htm "Big Objects Implementation Guide: Big Objects - html (New Window)")