I put the following code in .js of a doctype. It should filter a field of a child table based on the value selected from another field inside the child table but it is not working. Any help would be appreciate.
frappe.ui.form.on(“Lot List Item”, “refresh”, function(frm, cdt, cdn) {
row = locals[cdt][cdn]
frm.set_query("item", function() {
return {
"query":"erpnext.controllers.queries.get_item",
"filters": {
"item_sub_group": row.item_sub_group,
}
};
});
});