How to Fetch Sales Order Record Name Ex (SAL-ORD-2022-00223) based in Customer Name

Hi , Sorry for my long Request I am New beginner on write Scripts and missing some parts
hope can any one help

I Have A custom Doctype
With 3 Fields
Customer Name link Field with Customer
Sales Order Linked Field with Sales Order
Order ID Data Field and Have Same Field in Sales order Doctype

What I Need to when Select Customer Name

  1. filter only Sales orders for this Customer
  2. When entering Order ID Number in Return get customer Name and this Sale order Series Name
    Thanks :slight_smile:

use some thing like below

  frappe.ui.form.on("Doc Name", {
customer:function(frm) {
    frm.set_query('sales_order',function(){
        return {
            filters:{
            'sales_order':frm.doc.customer
            }
        };
    });
}

});

frappe.ui.form.on(“Customers Follow Up”, {
customer:function(frm) {
frm.set_query(‘sales_order’,function(){
return {
filters:{
‘sales_order’:frm.doc.customer
}
};
});
}
});
it’s not filters on customer Select …I am missing something Sorry still learning