Using images in the Search Layout for an object Tab with Salesforce1

I have an object that uses a formula field to display an image and the Search Layout for the object Tab includes that image formula field. The images display fine in Salesforce Touch, but with Salesforce1 the formula itself is displayed, not the image. Note that this problem doesn’t seem to occur on other list views, just the Search Layout associated with the Tab. Are there any workarounds to make the images show up in Salesforce1 like they do in Touch?

This is an example of where to find the Search Layout for the object Tab, which is the view causing problems:

Search Layout option for Programs Tab currently does not have the formula field added.

Example through iOS app of the image formula not working:

img tag is escaped


I suspect this is a bug in the Salesforce1 iOS app and that the image formula fields are not supposed to display in this layout at all. This is based on:

  1. the other devices not showing the link at all, and
  2. the value being incorrectly HTML encoded in the iOS version, and
  3. any other selected fields on the layout not displaying. In my example below the Company and Phone fields don’t appear on any device. Perhaps only the Name field is supposed to appear.

I did a test and my images appeared in the Salesforce1 search layout.

  1. Created a test formula field on Leads with the following formula: IMAGE("/img/seasonLogos/2014_winter_aloha.png", "Red")
  2. Added the field to the Selected Fields of the Leads Search Results layout. I had to include it in the first four fields as

    …Salesforce1 search results show only the first four fields from an object’s Search Results layout


  3. Tried searching for John via /one/ in chrome. The image appeared (although cropped).
    Salesforce1 from Chrome
  4. Tried the same thing from my phones browser. It appeared, but was also cropped as well Salesforce1 from Nokia Lumia 920

So it would appear at the most basic level the Salesforce1 Search Results page will display images from formula fields.

The issue might be the specific image link that the formula is creating. Possibly in combination with how Salesforce1 is being viewed (I.e. native iOS or Android app). Historically I’ve seen browsers include the intended image URL as a placeholder when the intended image couldn’t be loaded.

What does the HTML source look like for the problem page? In particular, is Salesforce rendering image tags?

As you have noted, when using a browser directly only the Name field will appear on recent items regardless of the Tab Search Layout.

Tab Search Layout won't render any additional columns.

Here is my Lead Tab Search Layout.

Leads Tab Search Layout

As the same layout appears in the iOS Salesforce 1 app.
iOS Salesforce1 showing HTML escaped Images

Source : Link , Question Author : snugsfbay , Answer Author : Daniel Ballinger

Leave a Comment