1

I need some help with a Formula Field (please don't send me visualforce code) image.

I am trying to get the image from a zipped static resource.

BCIGraphics is the zip file.

Here is what I have tried:

IMAGE('/resource/BCIGraphics/RedLocked.png',"! Outside Window",50,50)
2
  • 1
    The formula looks fine to me, are you sure you are using the correct names of the static resource and the file ? Are you looking at the formula field on the page layout of an object (or) using it in a email template
    – Rao
    Mar 11, 2016 at 17:59
  • 1
    Don't think it works using an archive, you have to use the location to the unzipped image
    – user28311
    Mar 12, 2016 at 9:16

2 Answers 2

2

Try something like this:

IMAGE(CASE( Status__c ,  
 'Open', '/resource/status/green.png',  
 'Closed', '/resource/status/red.png',  
 'Planning', '/resource/status/yellow.png',  
 ''), "rating") 

http://luckytechshare.blogspot.in/2015/02/display-images-in-salesforce-reocrd.html

If it still does not work for you then check the path in zip file. Use View source and copy paste the SRC of image tag in the new tab and experiment with it.

Many times there is issue with path that is gendered.

0

Your path is wrong. You will have to copy the path from the 'Show Details' Link in your static ressource.

This will end up in something like...

"/resource/1470140315000/Icons"

...where Icons for example is the name of your static ressource. Then you simply follow the path in your zip to your image. For example...

"/resource/1470140315000/Icons/png/banana.png"

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .