Welcome to Community Week 2025! Join us to learn, connect, and be recognized as we celebrate the spirit of Community and the power of AI. Get the details  

How to send Email on a button Click and at the same time submit the record.

ashish9
Tera Contributor

We have a Related list on the Task form which is reference to a custom table u_table1.

When we click on New button it open a Dialog view of u_table1 table. 

On the custom form we have a button Send Email with a UI action {emailClientOpenPop('u_Table1');}which send an email from that popup after that it comes back to the custom form dialog view then we can submit the record  by submitting it.

But we want when the Email is sent and record should be submitted as well in 1 Click. Kindly suggest

6 REPLIES 6

Not sure below code will work in UI Dialog or not but it does work in UI Action. You can try invoking the OOB Email Client with below code.

emailClientOpen(this,'table_name_on_which_the_email_will_be_triggered');

enter the table name after this.

Above will open the OOB email dialog.

ashish9
Tera Contributor

Thanks Alok, I am able to invoke Email in dialog with emailClientOpenPop('u_xyz') but at the same time it should submit the record on the table u_xyz.