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

Dynamic Url and show image in URL

Hi Guys,


I am sending a mail where image gets attached to it. Its working fine but due to hard code now its creating problem. It's trigger which sends email to customer along with image. We need to make this URL dynamic can anybody no how can we implement this or make this URL dynamic. I want to show the image along with the mail.   String htmlbody = '<img src=""/> 


When I remove img tag then only link displays. I want that image to be appears in the email.Can anybody know how can we do this. It's really appreciated.





where are you storing the images if they are in static resource then you can query the static resource and if they are in document or notes and attachment then they will have the Parent Id field which you can use in your query to get the associated image with there record .it will be great if you tell me where have you stored the images in salesforce .




I Stored Images in document.