I want to add more filters in items child table’s item code link data, How can I do this?
@Lone_Wolf , This script works. Change according your need.
frappe.ui.form.on("Material Request",
cur_frm.cscript.onload = function(frm) {
cur_frm.set_query("item_code", "items", function() {
return {
filters: {"item_group": "ABC"}
}
})});
Output
Thanks
Hi @Lone_Wolf,
Please check the documentation of Overriding Link Query By Custom Script.
I hope this helps.
Thank You!
1 Like
Its working after calling the function from refresh. Thank you everyone.