I'm trying to create a Lightning email template on Lead Object. It is giving below error: enter image description here

This works fine if the recipient is a contact record but fails if a user is selected.

And same thing works with user record if I use {!Recipient.name} instead of {{{Recipient.name}}}.

But I can't have this - {!Recipient.name} syntax in lightning email template as it gives error while saving.

  • Your question is slightly confusing, let me try to clarify. You are seeing different behaviours using HML for Lead, Contacts and Users, correct? If so, this is expected as per docs. If I read your question incorrectly, you may wish to elaborate on the problem you are facing in isolation.
    – TSmith
    Dec 8, 2021 at 13:28
  • You're totally right! So, if the recipient is going to be a any record owner(User). We should use classic email template only right? Or is there a work around to keep using lightning email template for user as recipient? Dec 8, 2021 at 13:41
  • To continue using Lightning Email Template for User, use SML (Salesforce Markup Language) like {!Recipient.name}. Unfortunately you cannot use SML and HML dynamically in a single email template which means you should have a separate Lightning Email Template for Lead in this case.
    – TSmith
    Dec 8, 2021 at 13:46
  • Do you mean it is possible to have a lightning email template using SML for merge fields? If so how, because if I try to save a Lightning template I get error like - "This template doesn’t support SML merge fields. Use the merge field picker to replace merge fields starting with "{!".: HTML Value" Dec 8, 2021 at 14:06
  • Of course, SML is still supported in Lightning Email Templates with some minor limitations as documented.
    – TSmith
    Dec 8, 2021 at 14:08


You must log in to answer this question.

Browse other questions tagged .