---
schema_version: "1"
id: 860cb4b1ab351c269fcfaf71153b23036081c4d43f9811d1b4310a49a4a054e9
title: FieldChangeSnapshot
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/object_reference/sforce_api_objects_fieldchangesnapshot.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_fieldchangesnapshot.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: e6f0992da3d7fd37ec6832418290e44ea0c61ac786ab6c8897a7d1c7704a0da4
description: Use this virtual object to learn which opportunities' close dates changed during the specified time period. This object is available in API version 52.0 and later.
---
# FieldChangeSnapshot

Use this virtual object to learn which opportunities' close dates changed during the specified time period. This object is available in API version 52.0 and later.

## Supported Calls

describeSObjects(), query()

## Special Access Rules

To use FieldChangeSnapshot, set up historical trend reporting for opportunities in your org. You must also have the Pipeline Inspection user permission and the Pipeline Inspection setting enabled.

## Fields

| Field | Details |
| --- | --- |
| CurrentValueDateOnly | 
Type

date

Properties

Filter, Group, Nillable

Description

The current value of a date field on the opportunity.



 |
| FieldName | 

Type

string

Properties

Filter, Group

Description

The name of the field to get the change history for. Possible values are:

- CloseDate





 |
| ParentId | 

Type

reference

Properties

Filter, Group

Description

The ID of the opportunity to get the change history for.

This is a relationship field.

Relationship Name

Parent

Relationship Type

Lookup

Refers To

Opportunity



 |
| ValidFrom | 

Type

dateTime

Properties

Filter

Description

The date and time that specifies the beginning of the time period.



 |
| ValidTo | 

Type

dateTime

Properties

Filter

Description

The date and time that specifies the end of the time period.



 |

## Usage

Use FieldChangeSnapshot to learn about the first change made to the specified opportunity during the specified time period. Subsequent changes are not returned.

## Example

Suppose that last week you changed an opportunity's close date to June 1, 2021. Assuming the opportunity had the ID '006R0000XXXXXXXXXX', the following query would return the CurrentValueDateOnly of June 1, 2021:

Select CurrentValueDateOnly from FieldChangeSnapshot where ParentID = '006R0000XXXXXXXXXX' and FieldName = 'CloseDate' and ValidTo = LAST\_WEEK AND ValidFrom = LAST\_WEEK and CurrentValueDateOnly < 2021-07-01