function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
pujapuja 

Update Old version of Content

Hi,

 

I want to Update the content of old version.

 

as:

List<ContentVersion> llList = [Select c.VersionNumber,c.Title, c.Description,c.ContentDocumentId From ContentVersion c                                                              where ContentDocumentId = '069U0000000I1j4' and VersionNumber =:'1'];

if(llList != null && llList.size() > 0 ) {
 llList[0].Description = 'Hello This is the Testing';
}
update llList;

 

But it gives an error "You cannot update a version that is not the latest version of a document. Please use the latest version of document"

 

Please help