Customization: Email Templates

Hi,

I want to give email template selection field in “New Email” link comments. I can do this by adding custom doctype and linking it to New Email doctype. But I am unable to find which doctype is triggered while clicking “New Email” button in comments.

Can someone guide me the name of doctype of below form?

It is not a doctype. It gets rendered from here https://github.com/frappe/frappe/blob/develop/frappe/public/js/frappe/views/communication.js

Thanks @neilLasrado for quick response.

I want to add custom field and link it to a custom doctype of “Email Templates”. I thought I would be able to use custom script cur_frm.add_fetch to fetch subject and message based on selection of link filed. This can be handy way of sending some common emails while pitching the lead.

Can you guide any alternate way of doing this as its not a doctype?

1 Like

Would be tough to do this. You will also need to change the code at some places.
What are the custom fields do you want to add ? Can you explain your use case ?

Most business communications have some similar emails to be sent to clients at various stages of communication. These can be saved as Email templates and can be pulled while sending emails from ERP.

1 Custom Doctype: “Email Templates” having 3 fields
Field 1: Title
Field 2: Subject
Field 3: Message
1 Link field in “New Email” linking it to Title field of “Email Templates” doctype
This will be used to pull subject and email message from “Email Templates” to “New Email”

It’s a simple feature, but can be very useful to many ERPNext users, who would have similar business emails to be sent to Lead/Opportunity/Customer. It can be considered to be included core feature as well by the team.

I have opened a git issue for this feature request. Anyone else who would like to have email templates functionality in ERPNext, please add your suggestions/reaction.

1 Like

any help. to make field(Message) read only in Email Model Box.

Could you plz modify the title of the post, as the earlier discussion is resolved. I guess your question is something similar but might need better words in title.

any updates.