From 047343ca1164869e17fff21571fc9b6829ac4591 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Fri, 16 Jan 2026 15:10:31 +0530 Subject: [PATCH] fix: js error on customer doctype --- erpnext/selling/doctype/customer/customer.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/erpnext/selling/doctype/customer/customer.js b/erpnext/selling/doctype/customer/customer.js index 5a5f5b27331..a2abaa5527d 100644 --- a/erpnext/selling/doctype/customer/customer.js +++ b/erpnext/selling/doctype/customer/customer.js @@ -212,9 +212,11 @@ frappe.ui.form.on("Customer", { frappe.contacts.clear_address_and_contact(frm); } - var grid = cur_frm.get_field("sales_team").grid; - grid.set_column_disp("allocated_amount", false); - grid.set_column_disp("incentives", false); + let grid = frm.get_field("sales_team")?.grid; + if (grid) { + grid.set_column_disp("allocated_amount", false); + grid.set_column_disp("incentives", false); + } frm.set_query("customer_group", () => { return {