Are you using Sales Invoice Header for some other purpose or only for “Sales Invoice Header”.“Sell-to Customer Name”?
I suggest you to take a record variable of Customer table and get the customer using “Sales Invoice Line”.“Sell-to Customer No.” in
Sales Invoice Line - OnAfterGetRecord() and show Cust.Name in Section…