How to Upload Attachments using Salesforce Data Loader?

Asked 08-Feb-2018
Viewed 896 times

1 Answer


1

Salesforce Data Loader can be used to upload attachments to Salesforce. To upload the attachments note the following:

  • If you are planning to upload the attachments via the Bulk API, it is required to verify that the attachment is being uploaded through the Bulk API Batch as Zip file, and the Setting or Setting page is enabled.
  • But, if you are migrating the attachments from one source to a targeted Salesforce destination (organization), begin by the requesting a data export for the source organization. Now, the Schedule Export Page, make sure to check the Include Attachments, that causes the file Attachment.csv to be included in your export. Now, you can use that CSV file to upload attachments. 

To upload the Attachments: 

  • Clarify that the CSV file you expect to use for attachment, importing contains the following required columns (each column represents a Salesforce field):
    • Name – the name field of the attachment file, like myattachment.jpg.
    • ParentId – it is the Salesforce ID of the parent record.
    • Body – it is the absolute path to the attachment on our local drive. 
  • It ensures that the values in the Body column contain the full file name of the attachments as they exist on our computer. Like, an attachment which name is myattachment.jpg is located on our computer at a location, c:\Export, its Body must specify c:\Export\myattachment.jpg. The CSV file looks like this:
ParentId, Name, Body 50030000000VDowAAG,attachment1.jpg, C:\Export\attachment1.gif 701300000000iNHAAY,attachment2.doc,C:\Export\files\attachment2.doc 

This file can also include other optional Attachment fields, like Description.