Announcement

Collapse
No announcement yet.

Templating Cases relation seems to be null

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

  • Templating Cases relation seems to be null

    Hi Forum,

    I ran into some trouble while configuring the email notification template when a lead is selected from the relation. I would like to have some information about the lead(Customer) im my email.

    I used ginger templating as intended for the standard fields plus some fields I added within the cases entity and everything worked fine. However, when trying to display the object of the lead relation it does not appear.

    e.g.
    Customer: {{lead.firstName}} , {{lead.name}}, {{lead.addressCity}}

    yielding: Customer: , ,

    Judging from the Espo docs it seemed correct: https://docs.espocrm.com/development...end/templates/ the example shown here is: {{person.firstName}} which is how I used it. Furthermore, to get some insight I tried wrapping a {{#if lead}} around the expression above. Afterwhich, the string was not displayed in the email. This leads me to think that the lead relation even though selected is somehow seen as null or relations either can't be accessed at all via handlebars or have to accessed differently.

    I would appreciate any help and insight into the issue.

    Thank you in advance.

  • #2
    Hi SPO,

    I just checked the work of the placeholders that you indicated, and I can confidently say that they work correctly.
    Please make sure that you first choose the Case as Parent, and then select the desired Email Template. Also, keep in mind that these placeholders will work correctly if the Case and Lead have a Many-to-One relationship.

    Comment

    Working...
    X