---
schema_version: "1"
id: 76934b11091861c2ea9b6fd960b1837720b8e0d7c27a4815ec9c5c6173fb16a1
title: OpportunityFieldHistory
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/object_reference/sforce_api_objects_opportunityfieldhistory.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_opportunityfieldhistory.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 8161ddf15c5cef62738bd949df1ee7ed3112d0a3fc23ebd61886782b21f55e6b
description: Represents the history of changes to the values in the fields of an opportunity. This object is available in versions 13.0 and later.
---
# OpportunityFieldHistory

Represents the history of changes to the values in the fields of an opportunity. This object is available in versions 13.0 and later.

## Supported Calls

describeSObjects(), getDeleted(), getUpdated(), query(), retrieve()

You can also enable delete() in API version 42.0 and later. See [Enable delete of Field History and Field History Archive](https://help.salesforce.com/articleView?id=000321814&type=1&mode=1&language=en_US "HTML (New Window)").

## Fields

| Field | Details |
| --- | --- |
| DataType | 
Type

picklist

Properties

Filter, Group, Nillable, Restricted picklist, Sort

Description

Data type of the field that was changed.



 |
| Field | 

Type

picklist

Properties

Filter, Group, Restricted picklist, Sort

Description

The name of the field that was changed.



 |
| IsDeleted | 

Type

boolean

Properties

Defaulted on create, Filter

Description

Indicates whether the object has been moved to the Recycle Bin (true) or not (false). Label is **Deleted**.



 |
| OpportunityId | 

Type

reference

Properties

Filter, Group, Sort

Description

ID of the Opportunity. Label is **Opportunity ID**.

This is a relationship field.

Relationship Name

Opportunity

Relationship Type

Lookup

Refers To

Opportunity



 |
| NewValue | 

Type

anyType

Properties

Nillable, Sort

Description

The new value of the field that was changed.



 |
| OldValue | 

Type

anyType

Properties

Nillable, Sort

Description

The latest value of the field before it was changed.



 |

## Usage

Use this object to identify changes to any fields on an Opportunity. The OpportunityHistory object represents the history of a change to the Amount, Probability, Stage, or Close Date fields of an Opportunity.

This object respects field level security on the parent object.

#### See Also

- [Opportunity](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_opportunity.htm "Represents an opportunity, which is a sale or pending deal.")