You need to sign in to do that
Don't have an account?
Karna_Shiva
How to put URL dynamically in HTML email template
How to put URL dynamically in HTML email template, i want to populate url dynamically otherwise on every instance i have to chance the URL.
Some one please suggest me what we have to do here.
Some one please suggest me what we have to do here.
There is an idea on this topic, please vote for it.
https://success.salesforce.com/ideaView?id=08730000000b3PjAAI
There is a workaround for that... you can create a formula field of type text and insert the following:
LEFT($Api.Partner_Server_URL_260, FIND( '/services', $Api.Partner_Server_URL_260))
That will give you the ORG''s URL ... than let's Say that you have created the formula field above with the name of "ORG URL", so you can type in on the template the following:
<a href={!YourObjectName.ORG_URL__c}/{!Opportunity.Id}>{!Opportunity.Name}</a>
Just make sure you replace the YourObjectName with the name of the object where you are running the workflow... so if you need to link it into another object via the lookup relationship you can get the ORG URL field that you created and merge with the ID of that object to put the link together.
-------------------------------------
Also look into below posts:
https://developer.salesforce.com/forums/?id=906F00000008mLsIAI
http://salesforce.stackexchange.com/questions/33035/adding-link-to-a-related-record-in-html-email-template
http://salesforce.stackexchange.com/questions/68988/dynamically-generated-link-in-an-email-template
https://success.salesforce.com/answers?id=90630000000gjpYAAQ
https://developer.salesforce.com/forums/?id=906F00000008mzFIAQ
https://developer.salesforce.com/forums/?id=906F00000008n2iIAA
https://www.shellblack.com/administration/create-a-html-email-with-merge-fields/
Please do let me know if it helps you.
Regards,
Mahesh
{!MID(Task.Link, 1, LEN(Task.Link)-15)}{whatever_you_want}
In my case, this produced:
https://marine-dev-ed.my.salesforce.com/{whatever_you_want}
No need for a custom field, custom label, custom setting, or apex.
This works for me
{!MID(User.Link, 1, LEN(User.Link)-15)}{!Target_User.Id}
Thanks
I need task Record Link so can you plz help me i am using {!MID(Task.Link, 1, LEN(Task.Link)-15)}{!Task.Id} in href tag but it is not working for me.plz let me know how do i used to get proper URL.
Could you please help me in getting Opportunity Link, using the Case Record. I tried different ways but not able to get Oppotunty Link using the Custom Look-up fields on Case Object
Thanks in Advance,
Ashutosh Mishra
I used this {!MID(Task.Link, 1, LEN(Task.Link)-15)}{whatever_you_want} for a record link and it worked the way you explained. Thanks for that. But how can we dynamically populate a lightning custom tab instead.
In one of my email templates, I need to direct the user to a custom tab instead of a record on an object. And I don't want to hardcode the URL as we have different orgs. Please guide. Thanks!
Since you have different orgs, though, you would want to check to see that they all have the same three character prefix. If so, just use that. If not, or your tab is based of off a Visualforce Page, you could create a Custom Label to store the value of the tab ID for each org and then create a formula field on whatever object you're using in the template to pull in the value of the Custom Label. Hope that helps.
Mark.