Display the list of ALL CONTACTS of a customer on Quotation or Invoice document

Hi everybody, I would like to display the list of ALL CONTACTS of a customer :

  • on Quotation or Invoice document

If anyone can help me I would be very grateful.

Thanks !

That for, you have to apply the client script for quotation and sales invoice doctype.

Here i provide the client script for the quotation.

frappe.ui.form.on("Quotation", {
    refresh: function(frm) {
        frm.set_query("contact_person", function(){
            return {
                "filters": [
                    ["Dynamic Link", "link_doctype", "=", "Customer"]
                ]
            };
        });
    }
});

Please also set the script for the sales invoice.

Then reload Ctrl+Shift+R and check it.

Reference: