Ask Search:
Sam HummelSam Hummel 

How to escape quotes in an Apex function within a Visualforce email template

I have a little Apex logic in my Visualforce email template.  It's a simple IF() statement that is supposed to determine which link is included in the email.  It all works great except that I can't figure out how to escape the quotes around the href url and have the link get properly rendered in the resulting email.  When I try \' or %60 or &rquot; the whole html string gets printed in the email without being rendered as a hyperlink.  Here's the function:

{! IF(OR(RelatedTo.Type = "xxxxx", RelatedTo.Type = "yyyyyyy"), "<a href=''></a>", "<a href=''></a>") }

I'm sure this is a dumb mistake, but I'm pulling my hair out with frustration, so I appreciate your patience.
Erica KuhlErica Kuhl
I would suggest posting this question to the Apex Developer Discussion Boards - they have a more technical slant that will help you get to your answer. 
Akash SharmaAkash Sharma
Thanks for post this helpful post - Please visit for More information about -
Packers and Movers in Bangalore @
Packers and Movers in Hyderabad @
Packers and Movers in Pune @
Packers and movers in Gurgaon @