Friday, May 17, 2013

Mass Upload Pictures to Rich Text Field

There is a lot of confusing stuff out there about mass uploading pictures into a rich text field. Below is one thing I have found by testing actually works pretty well.

Process:

  1. Upload image as an attachment into Salesforce against the record the picture is being added to.
  2. Use that success file to create a new CSV file with the following attributes.
    1. The ID of the record having the image inserted
    2. A column that will have the following text
<img alt="User-added image" src="https://c.na14.content.force.com/servlet/servlet.FileDownload?file=00Pd0000003Uf0n"></img>

The 'User-added image' can be replaced with the name of the contact, or not replaced at all. Follow the steps below to fill out the hyperlink:

  1. Add an image to any record in your Salesforce org as an attachment
  2. Open up the attachment
  3. Right click on 'View file' and select 'Open link in a new tab' (this is the option for Chrome)
  4. Copy the url that appears on the new tab, this is the base for the image link
  5. It will take some excel manipulation, but you will need to use the success file for the attachment upload and replace the ID at the end with the ID of all attachments uploaded.
In the end you will only need 2 columns in the file that is uploaded. One being the ID of the record that is receiving the picture, two being the img url from above.


No comments:

Post a Comment