Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
Upload Attachments
Before uploading attachments, note the following:
- If you intend to upload with Bulk API, verify that Upload Bulk API Batch as Zip File on the page is enabled.
- If you are migrating attachments from a source Salesforce org to a target org, begin by requesting a data export for the source org. On the Schedule Export page, select Include Attachments to include the Attachment.csv file in your export. You can use this CSV file to upload the attachments. .
Confirm that the CSV file you want to use for attachment importing contains these required columns. Each column represents a Salesforce field. The CSV file can also include other optional Attachment fields, such as Description.
- ParentId—Salesforce ID of the parent record
- Name—Name of the attachment file, such as myattachment.jpg
- Body—Absolute path to the attachment on your local driveMake sure that the values in the Body column contain the full path of the attachments on your computer. For example, if an attachment named myattachment.jpg is the folder C:\Export, Body must specify C:\Export\myattachment.jpg. Your CSV file looks like this example:
1ParentId,Name,Body 2 50030000000VDowAAG,attachment1.jpg,C:\Export\attachment1.jpg 3 701300000000iNHAAY,attachment2.doc,C:\Export\files\attachment2.doc 4 50030000000VJowBBG,attachment_word_document.doc,C:\Export\attachment_word_document.doc
Proceed with an insert or upsert operation (see Insert, Update, or Delete Data Using Data Loader). For the select data objects step, select Show all Salesforce objects and the attachment object name in the list.