HistoryRetentionJob

Represents the body of retained data from the archive, and the status of the archived data.

Version 

Introduced in API version 29.0.

Supported SOAP API Calls 

describeSObjects(), query(), retrieve()

Supported REST API Methods 

GET, HEAD, Query

Fields 

HistoryType 

  • Type: picklist

  • Properties: Filter, Group, Nillable, Restricted picklist, Sort

  • Description: The object type that contains the field history that you retained. Valid values for standard objects are:

For custom objects, use the object name.

RetainOlderThanDate 

  • Type: datetime

  • Properties: Filter, Sort

  • Description: The date and time before which all field history data was retained.

Status 

  • Type: picklist

  • Properties: Filter, Group, Restricted picklist, Sort

  • Description: Provides the status of the field history retention job. By default, field history tracking copies data to the archive, leaving a duplicate of the archived data in Salesforce. You can delete data from Salesforce manually after it’s archived.

Status can include:

  • Possible values:

    • CopyScheduled — CopyScheduled

    • CopyRunning — CopyRunning

    • CopySucceeded — CopySucceeded

    • CopyFailed — CopyFailed

    • CopyKilled — CopyKilled

    • NothingToArchive — NothingToArchive

    • NothingToDelete — NothingToDelete

    • DeleteScheduled — DeleteScheduled

    • DeleteRunning — DeleteRunning

    • DeleteSucceeded — DeleteSucceeded

    • DeleteFailed — DeleteFailed

    • DeleteKilled — DeleteKilled

NumberOfRowsRetained 

  • Type: int

  • Properties: Filter, Group, Nillable, Sort

  • Description: The number of field history rows that a field history retention job has retained.

DurationSeconds 

  • Type: int

  • Properties: Filter, Group, Nillable, Sort

  • Description: How many seconds the field history retention job took to complete (whether successful or not).

DID THIS ARTICLE SOLVE YOUR ISSUE?
Let us know so we can improve!