Hi All,
I’m trying to filter the Customer Address field based on the selected Customer, but the following code is not working as expected:
customer: function (frm) {
frm.set_query('customer_address', () => {
return {
filters: {
link_doctype: 'Customer',
link_name: frm.doc.customer
}
};
});
}
I want the Customer Address field to only show addresses related to the selected Customer.
What am I doing wrong, or is there a better way to achieve this?
Any help would be appreciated!