mirror of
https://github.com/frappe/erpnext.git
synced 2026-10-29 22:57:42 +00:00
fix: js error on customer doctype (backport #51788)
Guard the Sales Team grid access in the Customer form.
(cherry picked from commit 047343ca11)
This commit is contained in:
@@ -197,9 +197,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 {
|
||||
|
||||
Reference in New Issue
Block a user