How to upload images in to salesforce Object using Dataloader? - Answers - Salesforce Trailblazer Community
Trailblazer Community
Ask Search:
Rama KrishnaRama Krishna 

How to upload images in to salesforce Object using Dataloader?

Best Answer chosen by Rama Krishna
Shivanath DevinarayananShivanath Devinarayanan
1. Prepare CSV file
  1. You can use Ms Excel to create new CSV file with following columns:
  2. ParentId - Id of the record to which the attachment should be associated
  3. Name - Name of the attachment (you can put file name here)
  4. ContentType - Format of the extension (e.g. image/jpeg, application/vnd.ms-excel, etc), if you not sure, you can run SOQL query to Attachment object for similar file type. However, this field is not mandatory, so you can leave it blank or un-map it.
  5. OwnerId - Id for the owner of the attachment (UserId). If you not put any UserId here, your UserId will be OwnerId
  6. Body - File path to the attachment on the local machine (C:\temp\how to make gold.png)
2. Login to Apex Data Loader
  1. Select the "Insert" button.
  2. In the 'Select Salesforce Object' window, select the 'Show all Salesforce Objects' checkbox and then select "Attachment".
  3. Choose the CSV file you have prepare above.
  4. In the mapping step, map the following fields:
User-added image

Source : http://simplysfdc.blogspot.in/2013/09/salesforce-mass-upload-files-to.html

 
 if our suggestion(s) worked,  let us know by marking the answer as "Best Answer" right under the comment.This will help the rest of the community should they have a similar issue in the future.  Thank you!

Shiv

All Answers

Sharif ShaalanSharif Shaalan
Hi Rama, which object are you trying to load the images to? what is the use case?
Shivanath DevinarayananShivanath Devinarayanan
1. Prepare CSV file
  1. You can use Ms Excel to create new CSV file with following columns:
  2. ParentId - Id of the record to which the attachment should be associated
  3. Name - Name of the attachment (you can put file name here)
  4. ContentType - Format of the extension (e.g. image/jpeg, application/vnd.ms-excel, etc), if you not sure, you can run SOQL query to Attachment object for similar file type. However, this field is not mandatory, so you can leave it blank or un-map it.
  5. OwnerId - Id for the owner of the attachment (UserId). If you not put any UserId here, your UserId will be OwnerId
  6. Body - File path to the attachment on the local machine (C:\temp\how to make gold.png)
2. Login to Apex Data Loader
  1. Select the "Insert" button.
  2. In the 'Select Salesforce Object' window, select the 'Show all Salesforce Objects' checkbox and then select "Attachment".
  3. Choose the CSV file you have prepare above.
  4. In the mapping step, map the following fields:
User-added image

Source : http://simplysfdc.blogspot.in/2013/09/salesforce-mass-upload-files-to.html

 
 if our suggestion(s) worked,  let us know by marking the answer as "Best Answer" right under the comment.This will help the rest of the community should they have a similar issue in the future.  Thank you!

Shiv
This was selected as the best answer
Rama KrishnaRama Krishna
Hi Sharif,
    Any Standard objects or Custom objects