Hai,
The following client script is not working on material request
frappe.ui.form.on(“Material Request”, “onload”, function(frm) {
console.log(“Script is running.”);
frm.fields_dict[‘items’].grid.get_field(‘item_code’).get_query = function(doc, cdt, cdn) {
var child = locals[cdt][cdn];
console.log(child);
return {
filters: [
[‘item_group’, ‘=’, ‘Services’]
]
};
};
});
but when i try similar code in Purchase order or quotation it is filtering the group