How to add more filters in items child table's item code?

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
image

Thanks

@Suresh_Thakor Thanks for your reply. I got an error on implementing your given code:

Screenshot from 2024-03-25 12-18-11
Screenshot from 2024-03-25 12-17-45

1 Like

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.