Note: This article relates to the deployment of the
Guides to deploying other binary data types are in the following places:
Documents represents a file that a user has uploaded. Unlike
Attachment records, documents are not attached to a parent object. Prior to the addition of Salesforce CRM Content and Salesforce File, you could store files in Salesforce on the Documents tab. Although not as robust as Content, the
Documents tab is still available on Salesforce Classic.
Documents aren’t available in Lightning Experience. To use
Documents in Lightning Experience, export them in your weekly export or using Data Loader. Then upload them into Lightning Experience as Salesforce Files.
Select the relevant metadata type in your comparison filters:
Document and the related
Document Folder (if not already present in the target):
Data deployment configuration
Attachment files (see article), if we select only
Document at the top level:
The deployment is going to fail with the error
"Required fields are missing: [FolderId]", due to the polymorphic relationship field not being included in the deployment:
In order to deploy
Document we need to select at the top level (first step of the configuration) also the parent object Folder:
You can use either metadata deployments or data deployments, whichever best suits your use case.