function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Dheeraj-(DJ)Dheeraj-(DJ) 

Hi Team! I am unable to add an image in custom field. My images are saved in documents folder. I am using formula field and believe my syntax is incorrect. Can someone correct me? IMAGE(‘/servlet/servlet.FileDownload?file=0156F00000CW1Wl‘)

NagendraNagendra (Salesforce Developers) 
Hi Dheeraj,

I can see that your URL is enclosed in single quotes.May I suggest you please enclose your URL in double quotes which should probably do the trick.

The URL can be as below: Note: Don't include the Salesforce domain (http://"https://www.salesforce.com")
in your URL.

For more information please check with this link below: Hope this helps.

Please mark this as solved if it's resolved.

Regards,
Nagendra.
 
Dheeraj-(DJ)Dheeraj-(DJ)
Hello Nagendra,

Thank you for your response and I really appreciate your help. I used the below formula and it worked.
IMAGE("/servlet/servlet.FileDownload?file=0156F00000CW1Wl", "Hello" , 100, 100)

Later I checked my records and found same image in all records. I have different images in the document folder that I wants to add in every records that I create.
For ex:  Object Record         Image
       1.   Football                  Football Image
       2.   Chess                    Chess Image
      
Nagendra, Is there a way if we can automate this using formula and bring different images to each records.?

Thanks in Advance!

Regards,
Dheeraj