ERPNext – Add Email Button to a form with advanced functionality

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.

recipientsWho will receive the email
is_a_replyIs this mail a reply
titleTitle of the email Window
subjectEmail Subject
attach_document_printIf the checkmark for attaching the print should be active
email_templateYou can attach the name of the default print here, it will be auto selected

Andere Beiträge

Beitrag teilen
DE