Newer Version Available

This content describes an older version of this product. View Latest

ContentDocumentHistory

Represents the history of a document. This object is available in versions 17.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.

Special Access Rules

  • Customer and Partner Portal users must have the “View Content in Portal” permission to query content in libraries where they have access.
  • A user can query all versions of a document from their personal library and any version that is part of or shared with a library where they are a member, regardless of library permissions.

Fields

Field Details
ContentDocumentId
Type
reference
Properties
Filter, Group, Sort
Description
ID of the document.
DataType
Type
picklist
Properties
Filter, Group, Nillable, Restricted picklist, Sort
Description
Data type of the field that was changed.
Division
Type
picklist
Properties
Defaulted on create, Filter, Group, Restricted picklist, Sort
Description
A logical segment of your organization's data. For example, if your company is organized into different business units, you could create a division for each business unit, such as “North America,” “Healthcare,” or “Consulting.” Available only if the organization has the Division permission enabled.
Field
Type
picklist
Properties
Filter, Group, Sort, Restricted picklist
Description
The name of the field that was changed. Possible values include:
  • contentDocPublished—The document is published into a library.
  • contentDocUnpublished—The document is archived or removed from a library, either directly or when the owning library is changed.
  • contentDocRepublished—The document is removed from the archive.
  • contentDocFeatured—The document is featured.
  • contentDocSubscribed—The document is subscribed to.
  • contentDocUnsubscribed—The document is no longer subscribed to.
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 read-only object to query the history of a document.