conceptmedical
I wrote about this in the previous post. Please wait for EspoCRM 9.0.0.
Design an Email Template
Collapse
X
-
Yes the code above should work fine in 8.4 and up. the iterator was introduced in version 8.4
-
victor, I have checked the same, Its working fine in PDF. but the requirement is for email template to push the item details in email body. -
It is better to wait for EspoCRM 9.0.0.
You can try testing on EspoCRM 8.2.4: not for the Email Template, but for the PDF Template (based on the Account entity).
The fact is that on EspoCRM 8.2.4 for the Email Template the code I proposed is not saved quite correctly, but for the PDF Template - everything is ok.
So, you can design your template (styles, font, etc.) on PDF Template, and when EspoCRM 9.0.0 is released, just transfer the code to Email Template.Last edited by victor; 12-18-2024, 10:26 AM.👍 2 -
kumaresan,
Beginning EspoCRM v.9.0.0
You can use the following code for your Email Template (you can also change the styles yourself) for Account, Contacts whose status is Active:
For Contacts whose status is Inactive (for second Email Template), replace the line:HTML Code:<p>Please find the Contacts under your Account Name bellow</p> <p></p> <table style="border: 1pt; border-spacing: 1pt; border-collapse: collapse; width: 100%;" cellpadding="4" border="3pt"> <tbody> <tr> <th width="35%" align="left">Name</th> <th width="35%" align="left">Contact Number</th> <th width="30%" align="left">Status</th> </tr> <tr x-if="{{equal status 'Active'}}" iterate="{{contacts}}"> <td>{{name}}</td> <td>{{phoneNumber}}</td> <td>{{status}}</td> </tr> </tbody> </table> <p></p>
toHTML Code:<tr x-if="{{equal status 'Active'}}" iterate="{{contacts}}">
More about iterate attribute: https://docs.espocrm.com/user-guide/...#each-iteratorHTML Code:<tr x-if="{{equal status 'Inactive'}}" iterate="{{contacts}}">
More about Conditional rendering attribute x-if: https://docs.espocrm.com/user-guide/...attribute-x-if
A special request is not to create more than one topic with the same request, like this one: https://forum.espocrm.com/forum/gene...-email-summeryLast edited by victor; 05-14-2025, 01:54 PM.👍 2Leave a comment:
-
Design an Email Template
Its a Simple, still i'm asking help me with a example pls
I have Account and 10 contacts with Status as Active / Inactive
I need to create a email template for each account, with only active Contact details in a tabulor form with fields Name, Contact Number, Status or in some cases, list all contacts under a Account.
Once i have a template, then i use it on Workflow with filter to send email !
Link this
Dear User,
Please find the Contacts under your Account Name bellowThank youName Contact Number Status Name 1 1234567890 Active Name 2 1234567852 Active Last edited by kumaresan; 12-16-2024, 01:31 PM.Tags: None

Leave a comment: