You need to sign in to do that
Don't have an account?
Chris Sanchez 5
email template conditional hyperlink
Hello - Is it possible to use a conditional hyperlink in an HTML email template? I have a URL link similar to this that works without using conditions that I can pass in the Account Name.
https://www.siteName.com//form5/fill?id712={!Account.Name}_FRVP&
How can I add a condition to work something like this?
https://www.siteName.com//form5/fill?id712={!IF(Verification_Report__c.ReportSelection__c = "",Verification_Report__c.Status__c,Verification_Report__c.InactiveStatus__c)}
I have a similar URL working in a button but that logic doesnt want to transfer over to an email template. Any help is appreciated. Thank You
https://www.siteName.com//form5/fill?id712={!Account.Name}_FRVP&
How can I add a condition to work something like this?
https://www.siteName.com//form5/fill?id712={!IF(Verification_Report__c.ReportSelection__c = "",Verification_Report__c.Status__c,Verification_Report__c.InactiveStatus__c)}
I have a similar URL working in a button but that logic doesnt want to transfer over to an email template. Any help is appreciated. Thank You
Currently email tempalte does not allow merge field from cross objects. See this link:
https://success.salesforce.com/ideaview?id=08730000000Brk7AAC
Only option is to pull the fields (that is the Report selection, Status and Inactive Status fields) from Verification Report object to the parent object using formula fields.
Once you create formula fields, your if condition should work.
On the other hand, rather then creating 3 formula fields, and then checking the if condition in email template, it would be better to create a formula field which checks your if condition. Since formula fields have no restrictions over the use of cross object fields.
Let me know how that works for you.
Thanks.
You can try something like this: https://www.siteName.com//form5/fill?id712={! IF(ispickval(Opportunity.ReportSelection__c ,''),Account.Status__c,Opportunity.InactiveStatus__c)}
Though if you are working with picklist fields, they dont work very well with IF condition. Better to create formula field.
Thanks.
{!IF(Account.Name == 'John Doe','<a href=" ' & Account.Link & ' ">Account Record</a>','')}
The merge field is the Account.Link and you don't use the {!SomeObject.field} format that you usual copy from the field merge field search box above you just need to use dot notation.