Note: This article relates to the deployment of the Attachments
(Salesforce Classic files).
Guides to deploying other binary data types are in the following places:
ContentDocument / ContentVersion files (Salesforce Lightning files)
Attachments
represent a file that a user has uploaded and attached to a parent object. Attachments
have been deprecated in Lightning Experience, and are being superseded and replaced in favor of the more robust feature called 'Files'. You can find more info in this post.
In Salesforce Classic, files uploaded to Notes & Attachments
are either Salesforce Files or Attachments
, depending on how your org’s preferences are set. The files uploaded to the Attachments
related list on Task and Event objects are always Attachments
.
Deployment configuration
We start by selecting Attachment
at the top level. We are used to the fact that Gearset would follow the lookup to the related Account
.
However, ParentId is a polymorphic relationship field, and the related object might be one of several different types of objects.
For this reason the tool is not going to present Account
in the related list, at the second step of the configuration.
And if we proceed we will hit the error “Required field is missing [ParentId]”.
In order to deploy Attachments
we need to select at the top level (first step of the configuration) also all the parent objects that the file is attached to.