DocType email trigger

Hi,

In the Menu dropdown there is an option of emailing the current doctype that works fine. I would like to fill in the recipient address automatically based on an option of the doctype.
Can you please inform me what is the javascript trigger of Menu–>Email option, to put all my logic inside?

Thank you!

Run this script
cur_frm.doc.email = "yourname@email.com";

Before triggering the Menu -> Email

2 Likes

Worked! Thank you @bohlian!