Announcement

Collapse
No announcement yet.

Custom fields in email templates

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Custom fields in email templates

    According to documentation
    It's possible to use placeholders in email template's body and subject e.g. {Account.name}, {Person.emailAddress}. They will be replaced with values of related records.
    But when template "is html" fields are shown like {Account.name}, {Person.emailAddress} - not the values of theese
    How can I fix it?

  • #2
    Where? In compose view?
    What entity is parent for this email?

    Comment


    • #3
      I'm sorry(( my fault...
      We were trying to send email to Contact while adding {Lead.firstName}
      Next time I'll check for few times before create a topic.

      By the way
      is there any way to check if the Lead has firstName? because if don't he receives email with this {Lead.firstName}
      Thanks

      Comment


      • #4
        Hey Pavel

        EspoCRM uses Handlebars.js, so I expect you can use the if block helper:
        {{#if Lead.name}} Kia ora, {{Lead.name}} {{else}} Greetings, new friend! {{/if}} More details: https://handlebarsjs.com/builtin_helpers.html

        Comment


        • pavel_s
          pavel_s commented
          Editing a comment
          Thanks a lot!
      Working...
      X