• SfDevRon
  • 0 Points
  • Member since 2010

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
  • 1

I know we can archive a content document by setting the isArchived field in the ContentDocument object.

However once that document is archived that record disappears from the ContentDocument object.


for e.g If I contribute a document/image file by uploading it to any library  .

The following query will bring 1 record.

 Select c.Title, c.PublishStatus, c.ParentId, c.IsArchived, c.Id, c.ArchivedDate, c.ArchivedById From ContentDocument c


now If I archive thie document either from UI or programatically the same query doesnot fetch any records.


Is there any way to fetch this record using SOQL and set the IsArchived flag back to False?