Is it possibble to access the custom settings in Email Templates directly? (I know I can refer the custom settings in formula, and then refer this formula field in the email template)

I am facing an issue where, I get a different URL in the email alert than what I see in the browser's address bar. Please refer the below question for more details:

Mismatch in Links recieved through email alerts and User getting redirected to home page

So as a last option, I was thinking to have a custom settings that will store the hardcoded URL and refer it in the Email Template. I feel that this is not a feasible solution, but I am not able to find any other solution.

1 Answer 1


Yes, you can access Hierarchical Custom Settings directly in Visualforce Email Templates.

  • So I will need to convert all my HTML email templates to Visualforce Email templates? Feb 21, 2013 at 5:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .