for the taxes child table,in field batch_no i want to filter only the company’s item and item which has batch_no only should display in sales invoice Doctype
Please, try following this script (JS), “on sales invoice Doctype”
frm.set_query('batch_no', 'taxes ', function() {
return {
filters: {
item_group: 'Products'
}
}
})
Generally, use this formula to Apply filters on a Link field in a Child Table
frm.set_query('filedname', 'childtable', () => {
return {
filters: {
filedname: 'value'
}
}
})