0

As per this Salesforce article:

  • history tracking on ContentVersion description field records NewValue only
  • field history for the Content is only available by querying the object ContentVersionHistory using Data Loader or another API tool.

But when using this SOQL:

    SELECT OldValue, NewValue, Field 
from ContentVersionHistory 
where Field != 'contentVersionDownloaded' 
order by field asc, CreatedDate desc

the export shows that NewValue is empty all the time when description field value has changed and it looks like NewValue and OldValue are always empty for other changes.

enter image description here

Has anyone encountered such issue ?

Note: created a case with salesforce support, waiting for reply

2
  • success.salesforce.com/… – kurunve Oct 11 '19 at 8:42
  • @kurunve thanks but this known issue is not related because the update on description field is being done by a user not via API. and as mentioned the official salesforce documentation says that description field can be enabled for history tracking and newvalue is supposed to be recorded – Shamina Oct 11 '19 at 8:52
0

Here's a summary of the response from SF support:

The "Description" field in ContentVersionHistory actually only tracks changes, not old and neither new values. They have reached out to the concerned team to get the article updated.

0

To add to @Shamina's answer, this is true of all TextArea fields that are longer than 255 characters. The ContentVersionHistory documentation should probably have mentioned this explicitly, but it is mentioned in the field history tracking documentation

Changes to fields with more than 255 characters are tracked as edited, and their old and new values are not recorded.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.