+ Start a Discussion

Site fields in Email Template



I've been trying to figure this out for a while but with no luck.


I'm trying to add my SF Site URL to an email template.

When I select the available Site merge fields and use them in the email, the actual email I receive comes with empty/blank text e.g.. the Site's fields are not merged into the email.


Does anyone know how to include the Site's URL in an email template?


Many thanks




Use HTML Tags with <a href="<youraddress>" notations. That should work for you.






I'm not sure I have it right.

This is what I am using now in my email template and is not working



 How would use suggest I change it?


Many thanks




Got it, sorry, i misread your question. What you want is to get the <youraddress> from my previous response.


In that case, that's a problem, you would have to go ahead and implement a custom outbound email controller class which allows you to have full cross-object access and the global variables like $Site.CurrentUrl and so on.


I already submitted an idea request for adding support for cross objects in email templates as well as access to global variables. It seems that SF did not put as much flexibility in their email templates as they did in other areas..


Refer to this to create your outbound email service class, with which you will be able to use those url fields as you do in any VF pages or Classes.


Hope this helps


Thanks a lot :-)

I hope your  idea will be accepted