You need to sign in to do that
Don't have an account?

How to have Links in a Visual force Email template which can open a VF page or Alert box.
Hello,
i am working on a Email Visual force template. In that Visual force template i need to have links as we cannot implement command buttons i guess. When we click on the link it should either redirect to Visual force page or open pop window like alert or confirmation box using java script. Now how could i achieve this when we click the link given in the VF Email template a VFpage or an alert or confirmation box opens up.
Please do help on this.
Thank you.
If I am reading your questions correctly, just use HTML:
But is there a way to get a link relative to your org?
The example below is in the docuementation but it is b-a-d bad. There's a hard-coded reference to the node. That means it won't be portable from a sandbox and if your org ever moves to a different node, you'll have to change your template.
i agree that hardcoding server domain is super bad idea
but if thats all you got, thats all you got
im disappointed i cant use the Case.Link which works in regular email templates
:(
How about: (passing into VF Template Component / controller then using that in the email)
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_methods_system_url.htm
String fullRecordURL = URL.getSalesforceBaseUrl().toExternalForm() + '/' + acct.Id;