Hello everyone, I have a problem in the Payment Entry I have a link field “party_type” in which you can only choose between Supplier and Customer, and according to that the options appear in another field that is dynamic link “party” what I am trying is to filter the field “party” according to the company, whether they are Supplier or Customer and I do not know why the filters I use only serve me when it is Supplier, in the case that it is Customer they do not serve.
Hi all,
I have the same issue where I try to restrict party to only customers/suppliers that are not disabled. However, the following query is simply not used to filter (i.e. overruled by other filters, I guess):
frappe.ui.form.on('Payment Entry', {
refresh(frm) {
// your code here
if (frm.doc.party_type === "Customer") {
cur_frm.fields_dict.party.get_query = function(doc) {
return {
filters: {
"disabled": 0
}
};
};
}
}