Unable To Filter Customers Based on Company and Project

Hello All,
I want to achieve a task, which is described as follow :-

I want to show the Customer (Link Field) based on the Company(Link) and Project (Link) selection of the user.

cur_frm.fields_dict[“customer”].get_query = function (doc, cdt, cdn) {
return {
filters: {
‘company’: [‘in’, cur_frm.doc.company]
}
}
}

cur_frm.set_query(“customer”, function () {
return {
“filters”: {
“company”: cur_frm.doc.company
}
};
});
I tried the above two solution, but didn’t work out for me. Can anyone help and contribute on this?