No email on submit erpnext 11

Hi.
I had to upgrade erpnext due to some issues. Now I am running v11 and when I hit submit on an invoice no email popup occurs.
How do I enable the email window on submit?

Thanks

Turbond

1 Like

The “Notification Control” is not available in v11. As a workaround, possibly you could go to “Menu > Email” and email the document.

Can I ask why this feature was removed? This was always very useful when sending quotes or when raising Purchase Orders for our company

3 Likes

Not sure about the decision to remove it, maybe someone from Frappe team could answer it.

Hi All,
I got back the email dialog by doing some modifications to my custom script in the after_save routine. I am referring to a custom field under customer to bring up the dialog only if the customer is meant to get invoices by email.

frappe.ui.form.on("Sales Invoice", {
  after_save: function(frm) {
	if (frm.doc.__unsaved){
	}
	else {
		//Now check to see if the docuent has been sumbitted (docstatus=1)
		if (frm.doc.docstatus==1) {
			//Check to see if invoice is meant to be sent by email.
			frappe.call({
				method:"frappe.client.get_value",
				args: {
					doctype:"Customer",
					filters: {"name":frm.doc.customer },
					fieldname: "send_invoice_by_email"
				},
				async:false,
				callback: function(r) {
					if (!r.exc) {
                                                //To be sent via email so show email dialog
						if(r.message.send_invoice_by_email==1) {
							frm.email_doc();
						}
						else {
                                                        //otherwise show the print preview
							frm.print_doc();
						}
					}
				}
			});		
		}
	}
  }
});

Why was this function removed in v11? We are on ERPNext Cloud.

4 Likes

Hi

We also wish that this feature remained

Hello;

After submitting the document (like sales invoice), I see a prompted message (appear and disappear very fast and automatically), is this what are you talking about it?

Regards
Bilal

Yes. Before a print preview would pop up and then the email dialog on top so you could send an invoice on submission to the customer, or print and send by mail.

OK, what is the problem that you are finding it?
This message is not appearing totally after submitting, or it is appearing and disappearing very fast and you are not able to click on which option you need?

Regards
Bilal

There is a new configuration doctype: Success Action, to configure that message. It can be a solution to the “no email popup” problem.

2 Likes

Hello @Nahuel_Nso
Yes that is correct. And if we configured the Success Action correctly, then we will be able to get the message and the options when we do Submit for the document.

One small thing is remaining and most probably it is a bug:
When configuring the Success Action and save the document, after doing refresh for the page, the selected actions is appearing not selected, but in the database, it is saved correctly. Is it bug? Or it was designed as this?
I think it is bug, because it should display what is the selected options to be able to know what was configured and how the action will work. This bug is related to the html parameter and how the code is written to display the options properly as selected and saved in the database.

Another thing: This Success Action is only related to the Submit? There is not any way to configure the action when doing Save?

Regards
Bilal

The error in the display of the checks is a bug indeed.

If the selected doctype is not submitable, the Success Action will trigger on save.

1 Like