ActivityFieldHistory

Represents a change in a field value for a tracked object or field.

Introduced in API version 55.0.

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

  • To see this object, users must have ViewAllData permissions.
  • Type: reference

  • Properties: Filter, Group, Sort

  • Description:

    The ID of the task or event that changed.

    This field is a polymorphic relationship field.

  • Relationship name: Activity

  • Relationship type: polymorphic

  • Refers to: Event, Task

  • Type: reference

  • Properties: Filter, Group, Sort

  • Description:

    The ID of the user who made the change.

    This field is a relationship field.

  • Relationship name: ChangedBy

  • Relationship type: relationship

  • Refers to: User

  • Type: datetime
  • Properties: Filter, Sort
  • Description: The date the field value changed.
  • Type: picklist
  • Properties: Group, Restricted picklist
  • Description: The type of the field with the changed value.
  • Possible values:
    • Address — Address
    • AnyType — AnyType
    • AutoNumber — AutoNumber
    • Base64 — Base64
    • BitVector — BitVector
    • Boolean — Boolean
    • Content — Content
    • Currency — Currency
    • DataCategoryGroupReference — DataCategoryGroupReference
    • DateOnly — DateOnly
    • DateTime — DateTime
    • Division — Division
    • Double — Double
    • DynamicEnum — DynamicEnum
    • Email — Email
    • EncryptedBase64 — EncryptedBase64
    • EncryptedText — EncryptedText
    • EntityId — EntityId
    • EnumOrId — EnumOrId
    • ExternalId — ExternalId
    • Fax — Fax
    • File — File
    • HtmlMultiLineText — HtmlMultiLineText
    • HtmlStringPlusClob — HtmlStringPlusClob
    • InetAddress — InetAddress
    • Json — Json
    • Location — Location
    • MultiEnum — MultiEnum
    • MultiLineText — MultiLineText
    • Namespace — Namespace
    • Percent — Percent
    • PersonName — PersonName
    • Phone — Phone
    • Raw — Raw
    • RecordType — RecordType
    • SfdcEncryptedText — SfdcEncryptedText
    • SimpleNamespace — SimpleNamespace
    • StringPlusClob — StringPlusClob
    • Switchable_PersonName — Switchable_PersonName
    • Text — Text
    • TimeOnly — TimeOnly
    • Url — Url
    • YearQuarter — YearQuarter
  • Type: string
  • Properties: Filter, Group, Sort
  • Description: The name of the field changed.
  • Type: boolean

  • Properties: Defaulted on create, Group

  • 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.

  • Default value: false

  • Type: datetime
  • Properties: Nillable
  • Description: The new value for date type fields.
  • Type: double
  • Properties: Nillable
  • Description: The new value for number type fields.
  • Type: string
  • Properties: Nillable
  • Description: The new value for all other field types that are not a date or number type.
  • Type: datetime
  • Properties: Nillable
  • Description: Old value for date type fields.
  • Type: double
  • Properties: Nillable
  • Description: Old value for number type fields.
  • Type: string
  • Properties: Nillable
  • Description: The old value for all other field types that are not a date or number type.
  • Type: picklist
  • Properties: Group, Restricted picklist
  • Description: The operation of the field value change.
  • Possible values:
    • delete — delete
    • update — update

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.

If you remove the ActivityId field from the WHERE clause, the query fails.