Try ERPNext Buy Support Partners Foundation Foundation Members

Get current user email on template

How can I get current user email on my quotation print template?

Like {{ frappe.session.user_email }}


{{ frappe.db.get_value("User",{"name":frappe.session.user}, "email") }}

1 Like

Dear @Leonardo_Augusto
how to do that as JV script to get user email into filed in sales order doc

Hello @Alaa_Badri

Keep the below code in refresh event of Sales Order for getting the current user email in to a field.

if(frm.doc.owner != undefined){{
				callback: function(userEmail){
					if(userEmail.message != undefined){

The new field name in Sales Order is “user_email” for setting the email of a user in this field.
This is how we can do within the js part of the code. I hope it is useful for you.

Thanks & Regards,
Kalpit Shah

Thank your You Save my Life