Default Ship-to Address

Is there a way for invoices/credit memos to default in a customer’s Ship-to code/address? We have customers with several Ship-to addresses and only one main billing address. So, we use that address as the General Address on the customer card, but I can’t figure out a way to get a certain Ship-to code to default in. It’s always blank so it uses the general address as the ship-to address unless you manually select a different ship-to code. I tried the Location Codes and Shipment Method codes, but nothing seems to default in a certain ship-to code.

We have a “Default Ship-To Code” field on our customer cards.

It’s part of Lanham’s E-ship so it’s not standard.

Shouldn’t be hard to replicate if you can do some code.

New field on the customer card called " Default Ship-To Code" type code with a lookup to the ship-to table so you can select one. and on the onvalidate trigger of the sales header table check to see if that field has a value & if so

VALIDATE(SalesHeader.“Ship-To Code”,Customer.“Default Ship-to Code”);

To be exact:

Sell-to Customer No. - OnValidate()

GetCust(“Sell-to Customer No.”);

IF Cust.“Default Ship-for Code” <> ‘’ THEN VALIDATE(“Ship-for Code”,Cust.“Default Ship-for Code”);

You can consider the first “ship-to address” as the default one, then you can write in the “On Validate” of “sell to Customer code” , after declaring:

SalesInvoiceHeader record (112);

ShipToAddress record(222);

the following code:

Withe ShipToAddress Do



TestField(“Sell-to Customer No.”) ;

SetRange(“Customer No.”,“Sell-to Customer No.”);

If Count > 0 Then



SalesInvoiceHeader.Validate(“Ship To Code”,“Code”);//Or The Rest Of Fields




SalesInvoiceHeader record (112)

I’m pretty sure you would want the ship-to code field updated in the sales header not the sales invoice header.

all shipping labels n such would be wrong if you update it after the fact.


Thanks Savatage,

so he could replace that by the line

SalesHeader Record(36);

What if you already have a list, and you want the second one in the list to be the default? I like Harry’s solution, I’ve actually used that quite a few times.