5

How to get/access static resource image in formula field. static resource name is low and image is low.png.

0
8

This example displays the image regardless of the value in any field.

IMAGE('/resource/low', "low", 64, 64)

This example displays an image of a green square if the amount of an opportunity is greater than 100, a yellow square if it's under 51 and 99, and a red square if it's less or equal to 50. (You have to upload three images for this example)

IF( Amount > 100, IMAGE("/resource/Green", "Green"),
IF ( Amount > 50, IMAGE("/resource/Yellow", "Yellow"),
IMAGE("/resource/Red", "Red")))
3

Create formula field with "Text" formula return type, use IMAGE formula

IMAGE("/resource/low", "low", 32, 32)

IMAGE(image_url, alternate_text, height, width) and replace image_url with the full path to the image. Replace alternate_text with the string of text you want to appear when the image can’t be rendered for some reason. This text can be used by screen reader software. Replace height with the vertical size of the image in pixels. Replace width with the horizontal size of the image in pixels.

0

Image('https://~~your_org~~/resource/low/low.png',"",44,44)

  1. https://your org/resource/low/low.png - URL to need image in static resource
  2. "" - Alternative text - set whatever you need
  3. First 44 - height
  4. Second 44 - width
1
  • if i'll deploy in another sandbox this will failed because in image you are putting url which definitely change in another sandbox so this will work only in same sandbox that's it. – cloudZigZag Aug 7 '18 at 11:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.