Email templates - ability to use a child attribute - Somthing like "contact_person.first_name"

Simplest user side ask.

When I design an email template - I should be able to use “first name” of the linked contact person by doing something like {{contact_person.first_name}}

More details

  • While doing the email templates for a document, when I use a variable for the “contact_person” it picks up the title of the contact person. How can I instead choose another child attribute of the contact_person

Thanks

As a second thought, if there was a way to print what data dictionary Jinjha gets would be a great way to debug this.

And as a second step, if we could add more data elements to this dictionary, that would kind of solve it the best way.

The biggest problem with adding things by adding custom fields in the transaction is that it only works for transactions that are created post that customization was made. Which is something that I am looking to avoid.

Hi @Brajkishor_Baheti,

Get first_name for apply it.

{{frappe.db.get_value("Contact",contact_person,'first_name')}}

Then reload and check it, please.

Thank You!

1 Like