diff --git a/erpnext/selling/doctype/customer/customer.js b/erpnext/selling/doctype/customer/customer.js index 16f0fafc67..55aaa02428 100644 --- a/erpnext/selling/doctype/customer/customer.js +++ b/erpnext/selling/doctype/customer/customer.js @@ -44,13 +44,13 @@ frappe.ui.form.on("Customer", { }, customer_primary_address: function(frm){ if(!frm.doc.customer_primary_address){ - frm.doc.primary_address = ""; + frm.set_value("primary_address", ""); } }, customer_primary_contact: function(frm){ if(!frm.doc.customer_primary_contact){ - frm.doc.mobile_no = ""; - frm.doc.email_id = ""; + frm.set_value("mobile_no", ""); + frm.set_value("email_id", ""); } }, @@ -92,4 +92,4 @@ frappe.ui.form.on("Customer", { validate: function(frm) { if(frm.doc.lead_name) frappe.model.clear_doc("Lead", frm.doc.lead_name); }, -}); \ No newline at end of file +});