Friday 19 October 2012

How to import attachments using Apex Data Loader?



Steps to import attachments using Apex Data Loader are
  1. Create an AttachmentLst.csv file with the following column headers:
·         ParentId - ID of the record to which the attachment should be associated  
·         Name - Name of the attachment  
·         ContentType - Format of the extension (e.g. .xls, .pdf, etc)  
·         OwnerID - ID for the owner of the attachment 
·         Body - File path to the Attachment on your local machine (C:\Attachments\FileName.jpeg)
  1. Log in to the Data Loader. 
  2. Select the "Insert" command.
  3. In the 'Select Sforce Object' step, select the ‘Attachments’ object. This object is not displayed by default hence check the ‘Show all Sforce Objects' checkbox. 
  4. Choose the AttachmentLst.csv file. 
  5. In the mapping step, map the following fields:
·         Parent ID 
·         Name 
·         Owner ID 
·         Body - Make sure to map the Body column which you created previously with the file extension. This is how you designate the file and location of the attachments to be inserted. 
                  7. Click "OK" to start the upload.

No comments:

Post a Comment