function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ 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.