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
Victoria KerryVictoria Kerry 

Trying to include an IF formula in html email template

Hello, 

I'm using a classic email template with HTML and can't seem to get this code to work: 

{!IF(Demo_Request__c.Are_we_talking_to_a_CFO_Decision_Maker__c, "yes", "no"}

It's refencing a checkbox for a yes/no question but the test email doesn't show anything where the formula product should be.. Can anyone help? The field name was pulled from the "Copy Merge Field Value" found under Available Merge Fields.
Best Answer chosen by Victoria Kerry
Victoria KerryVictoria Kerry
I figured it out, I was missing a close parenthesis: {!IF(Demo_Request__c.Are_we_talking_to_a_CFO_Decision_Maker__c, "yes", "no")}

All Answers

VinayVinay (Salesforce Developers) 
Can you share the screenshot of the error?  Also what is the field 'Copy Merge Field Value' and which object do these refer?

Thanks,
Victoria KerryVictoria Kerry
I was wondering if anyone has any ideas on what's wrong with my formula? 
Victoria KerryVictoria Kerry
Hey Vinay,

The copy merge field value is just the area where Salesforce gives you the proper formatting when adding a field. Sorry for the confusion there! There isn’t really a screenshot I can send as there is no error.. The field I’m trying to add just isn’t there. 
Victoria KerryVictoria Kerry
I figured it out, I was missing a close parenthesis: {!IF(Demo_Request__c.Are_we_talking_to_a_CFO_Decision_Maker__c, "yes", "no")}
This was selected as the best answer