0

I am trying to understand the relation between documents and contentversion. When i queried documents, it returned 100+ records but when i queried contentversion it returned only 1. Please help me understand the relation between them. Plan is to move to lightning so doing some groundwork. Also i read to write some trigger on documents write it on contentversion. How these 2 are related?

1

Document

Represents a file that a user has uploaded. Unlike Attachment records, documents are not attached to a parent object.

ContentVersion

Represents a specific version of a document in Salesforce CRM Content or Salesforce Files. This object is available in versions 17.0 and later for Salesforce CRM Content documents. This object is available in versions 20.0 and later for Salesforce Files.

Differences Between Files, Salesforce CRM Content, Salesforce Knowledge, Documents, and Attachments

There is no relation between these 2 objects.

Moving Documents to Salesforce Files

How do I move files from the Documents tab into Lightning Experience?

While there isn’t a one-click solution, you do have some options once you identify the files in the Documents tab that you want to use in Lightning Experience and your communities.

  • Export documents in the weekly export, and then upload the documents into Salesforce Files
  • Use a third-party data export tool from the AppExchange, like FileExporter from Salesforce Labs

  • Use an API-based tool (The Chatter REST API supports uploading asset files.)

  • When moving to lightning as documents are not supported by lightning, i was asked consider moving to Salesforce file to do that i was asked to run a report on contentversion, so what does that mean? – sunshine Jul 25 '17 at 15:21

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.