+ Start a Discussion
Michal BireckiMichal Birecki 

HTML Email IF Statement with Custom Fields

Hello,

I'm trying to setup IF statements for my HTML email (not using visualforce).

I put the following code, and it gives me problems:

<p>New test: {!if({!Lead.Campaign_Ran_On__c='True'},{!Lead.Campaign_Ran_On__c},{!Lead.Campaign_Ran_From__c} and {!Lead.Campaign_Ran_To__c})}</p>
Please advise.
Christine KleinChristine Klein
I have something similar in one of my email templates.  Here is my IF statement.
<td>{!IF(Account_Plan__c.Consolidated_Customer_Information_URL__c="", 'https://intranet.opentext.com/intranet/llisapi.dll/Open/CCI',Account_Plan__c.Consolidated_Customer_Information_URL__c)}</td>

So you might want something like this
<p>New test: {!IF(Lead.Campaign_Ran_On__c = 'True' ,Lead.Campaign_Ran_On__c, Lead.Campaign_Ran_From__c and Lead.Campaign_Ran_To__c)}</p>
Hope that helps.

Michal BireckiMichal Birecki
Thanks Christine, I'll give this a good shot.