I have an email template that has some static links (URL) that points to our instance of Salesforce. Is there a way to get the instance URL dynamically? This template is not being called from Apex code. so can't programmatically replace anything.

1 Answer 1


Lightning Email Templates don't currently give you this ability, however you can create a custom formula field on the object you're merging (assuming you're merging an object) that can merge in the org specific URL.

E.g create a formula field with a formula of:

LEFT($Api.Partner_Server_URL_550, FIND('/services', $Api.Partner_Server_URL_550))

You must log in to answer this question.

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