I’m very new to ERPNext and Coding, so please be patient with me.
I added Custom Field to the Quotation DocType for Billing Contact, and I have successfully filtered the field to only Show Contacts from the Customer = Party_Name field in the quote using the script below.
frappe.ui.form.on("Quotation", {
refresh: function(frm) {
frm.set_query("custom_billing_contact_person", function() {
return {
filters: [
["Dynamic Link","link_doctype", "=", "Customer"],
["Dynamic Link","link_name", "=", frm.doc.party_name]
]
};
});
}
});
Now I want to extend the filter to only show Contacts that are selected as “Is Billable” = “Yes”.
I’m a little tripped up because the IS Billable field resides in the Contact DocType.
Any help would be appreciated.
Jack