Filters applied for does not work

frappe.ui.form.on('Additional Salary', "onload", function(frm) {
        frm.set_query("salary_component", function() {
            return {
                filters: [
                    ['Salary Component', 'type', '=', 'Deduction']
                ]
            };
        });
    });

image

@manal_erpnext

frappe.ui.form.on(‘Additional Salary’, “company”, function(frm) {
frm.set_query(“salary_component”, function() {
return {
filters: [
[‘Salary Component’, ‘type’, ‘=’, ‘Deduction’]
]
};
});
});

1 Like

why did you set the event the company?!

In core file filters is triggered on company

@Jeel thx