Quick note: This function is not official and may be removed by Frappe at any time.
If you want to add an email button that automatically inserts the recipients email address, you can do this the following way. This may come in handy when the email address is in another, connected form.
Add a client script in ERPNext, add the doctype you want to attach the script to.
The final script looks like this:
As you can see, I have added a couple of arguments (args) to it.
The two lines on top for doc and frm are neccessary. Everything else you can modify on your own.
recipients | Who will receive the email |
is_a_reply | Is this mail a reply |
title | Title of the email Window |
subject | Email Subject |
attach_document_print | If the checkmark for attaching the print should be active |
email_template | You can attach the name of the default print here, it will be auto selected |