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
annette.hamilton1.3947453971418005E12annette.hamilton1.3947453971418005E12 

Setting a default value in place of a null/blank field on an email template in SFDC

Hello all,

I have had good luck with substituting a specific value in a null field in a provious email template with the following code:
{!Contact.FirstName}{!IF(ISBLANK(Contact.FirstName,""),Lead.FirstName)},


Now I'd like to substitute a default value *00 number in the null/blank field for Case Owner Phone. I tried this thinking iot would work much the same way as the above, but it does not retuurn the default 800#.
{!Case.OwnerPhone}{!IF(ISBLANK(Case.OwnerPhone,""),800-523-7918)}
Any thought on how to make this happen?

Thanks!
Best Answer chosen by annette.hamilton1.3947453971418005E12
kevin lamkevin lam
Your first example shouldn't have worked because the ISBLANK function only accepts one argument.

What you need is:
{!Case.OwnerPhone}{!IF(ISBLANK(Case.OwnerPhone),"","800-523-7918")}

Or you can use the NULLVALUE function:
{!NULLVALUE(Case.OwnerPhone, "800-523-7918")}

All Answers

kevin lamkevin lam
Your first example shouldn't have worked because the ISBLANK function only accepts one argument.

What you need is:
{!Case.OwnerPhone}{!IF(ISBLANK(Case.OwnerPhone),"","800-523-7918")}

Or you can use the NULLVALUE function:
{!NULLVALUE(Case.OwnerPhone, "800-523-7918")}
This was selected as the best answer
annette.hamilton1.3947453971418005E12annette.hamilton1.3947453971418005E12
The NULLVALUE worked like a charm. Thanks!!