We have moved to lightning experience recently and we are receiving an error in lightning while sending email from Activity Tab of lightning.

Reproduction Steps:

  1. Goto Activity TAB of any Account and enter any email ID.
  2. Add a field Like {!USER.PHONE}, which has a blank value.
  3. Send the email.


Error Image

Has anyone come accross this issue or has a solution for this. I understand that I can fill the field but this is not always feasible.

I tried using BLANKVALUE but it doesn't works in lightning.

2 Answers 2


If you create a formula field (for example, User.Phone_Merge__c) where the formula is something like this: IF(ISBLANK(Phone),"No Phone Number",Phone) then you can use the formula in the email. I realize this isn't a perfect solution nor is it feasible in all situations but it does work.

Additionally, it seems like Salesforce is still bringing Lightning email up to speed. It does not handle blank merge fields at all right now, so it makes sense that they want to prohibit their use. Try this:

  1. Navigate to Salesforce Classic
  2. Visit your Account record - or if you would like to test this fresh, create a new Account.
  3. Click "Send an Email"
  4. Try the same merge field in that email {!User.Phone}
  5. The email will show the raw text {!User.Phone}
  6. Switch to lightning experience.
  7. Navigate to that Account.
  8. You should receive an error like this:

Lightning Email Error

Until Salesforce adds in support for ISBLANK/BLANKVALUE or blank merge fields, then I think a formula field will be the way to go. One final note, you MUST have at least one non-whitespace character in order for the formula field to work, otherwise you will get the same blank value error.

  • We are using this approach right now. Unfortunately, we have large number of fields on in the template. I guess I will have to wait till Salesforce resolves this.
    – manjit5190
    Commented Feb 7, 2017 at 14:09

This seems to be a Salesforce issue. I have noticed this as well. I had created a template in which the logged in user's phone number, designation and address is populated automatically. However if any of those values are blank it was giving this error. I think you should log it as a bug in Salesforce forum so that they can add null exception.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .