Sending an email with attributes from multi link records

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Mark
    Senior Member
    • Dec 2019
    • 143

    Sending an email with attributes from multi link records

    Hi,
    I wanted to ask if there is a possibility to somehow create an email template, which loop trough multiple related records and basically put down information about them in the template. So essentially its a similar feature to what the sales pack has with the itemList, where you can loop through it and put the information about those items in the list into a PDF template. https://gyazo.com/fa4bcc939c968662aae503b6cf63f80d .
  • Maximus
    Senior Member
    • Nov 2018
    • 2731

    #2
    Hi Mark,
    I think it is possible. Try this for Account entity to fetch data from related Opportunity records.
    Code:
    <table>
      <tbody>
        <!-- {{#each opportunities}} -->
          <tr>
            <td>Opportunity name: {{name}}</td>
            <td>Opportunity amount: {{amount}}</td>
          </tr>
        <!-- {{/each}} -->
      </tbody>
    </table>

    Comment

    • yuri
      Member
      • Mar 2014
      • 8440

      #3
      Hi,

      Not possible. Email templates do NOT support the same logic operators as PDF templates do.

      It's considered to add an experimental support in the future.
      If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

      Comment

      • Maximus
        Senior Member
        • Nov 2018
        • 2731

        #4
        Ops, sorry. My bad. Juri is right. I admit that it is not supported for the email template.

        Comment

        • Mark
          Senior Member
          • Dec 2019
          • 143

          #5
          Is it possible to add this kind of functionality to the email templates with code? And if yes what would be the best way to do it?
          Last edited by Mark; 04-10-2020, 11:33 AM.

          Comment

          Working...