I am using a visual force template. I can put the origin server in the email by doing:
{!LEFT($Api.Partner_Server_URL_140, FIND(".com/",$Api.Partner_Server_URL_140)+3)}
and when I an email sent I'll see:
https://na11-api.salesforce.com
However, when I try to use this in a URL which pulls in an image, I do:
<img src= "{!LEFT($Api.Partner_Server_URL_140, FIND(".com/",$Api.Partner_Server_URL_140)+3)}/servlet/servlet.ImageServer?id=015G0000001f7xo&oid=00DG0000000gUxRMAU" height="90"/>
I get:
Error: VFTemplate1 line 13, column 154: The reference to entity "oid" must end with the ';' delimiter
Error Error: The reference to entity "oid" must end with the ';' delimiter.
So I try escaping the " " characters around the com by doing:
<img src= "{!LEFT($Api.Partner_Server_URL_140, FIND(\".com/\",$Api.Partner_Server_URL_140)+3)}/servlet/servlet.ImageServer?id=015G0000001f7xo&oid=00DG0000000gUxRMAU" height="90"/>
And, I get same error. Any ideas?
Thanks.
Attribution to: dublintech
Possible Suggestion/Solution #1
Fixed by hanging the "
to '
around some of the parsing.:
<img src= "{!LEFT($Api.Partner_Server_URL_140, FIND('.com/',$Api.Partner_Server_URL_140)+3)}/servlet/servlet.ImageServer?id=015G0000001f7xo&oid=00DG0000000gUxRMAU" height="90"/>
Works with img
and apex:image
Attribution to: dublintech
This content is remixed from stackoverflow or stackexchange. Please visit https://salesforce.stackexchange.com/questions/4696