Announcement

Collapse
No announcement yet.

Email template placeholders with multiple matches won't work

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

  • Email template placeholders with multiple matches won't work

    Hi everyone,

    We send emails to leads with a workflow (send message task). It works just fine when there's only 1 lead targeted by the workflow.
    Since there are more than just 1 Lead targeted, the placeholders don't replace the value at all.

    (screeshot of the send message task :
    Utilisateur assigne = user
    parent relais = lead)

    and screeshot of the email received).

    Thax a lot for your feedback
    Attached Files

  • #2
    Hi,
    Could you also:
    1. Tell what is your EspoCRM version?
    2. Tell what is your Advanced Pack version?
    3. Tell what is the Target entity of the Workflow?
    4. Provide your Email Template screenshot.

    Comment


    • #3
      Hi Maximus !

      Thanx a lot for your concern.

      1. Espo version is 5.8.5
      2. Advanced pack version is 2.5.9
      3. The target entity of the workflow is a custom entity called "Partenariat" (Base) in relation many-to-many with leads
      4. Included email template screeshot (we also tried to place the {Lead.xxx} instead of {Person.xxx} and it didn't work either.

      Thanx

      Attached Files

      Comment


      • #4
        Unfortunately, it won't work.
        1. Placeholders like {Person.name}, {Person.firstName}, {Person.lastName}, etc. are special Placeholders that work only with the Person type entityes e.g.: Lead, Contact, User, Person custom entity.
        So this placeholder doesn't support the custom Base type entity.
        2. Placeholder like {Lead.name} supports only a single link connection (relation only to 1 Lead). In your case you have the link-multiple connection.

        As a workaround you can:
        1. Create a varchar/text type field in order to store all names of the related leads.
        2. Create a hook in order to retrieve and push the related names to the new field https://docs.espocrm.com/development/hooks/
        3. Add a placeholder of the new field to the email layout.

        Comment


        • #5
          Maximus he could also create notStorable field which will already with html view ;p

          Comment


          • Maximus
            Maximus commented
            Editing a comment
            Good idea.
        Working...
        X