Customer Address and Contact not auto-filling in Sales Order

Hi everyone,

I’m testing ERPNext and facing an issue with customer address and contact details.

What I did

  • Created a Customer: Global Tech Distributors Pvt Ltd

  • Added Address and Contact details

  • Marked the address as:

    • Primary Address

    • Billing Address

    • Shipping Address

  • Marked the contact as Primary Contact

  • Saved the Customer

In the Customer record, both the Primary Address and Primary Contact are showing correctly.

Issue

When I create a new Sales Order and select this customer:

  • Territory is fetched automatically

  • Customer Address is blank

  • Shipping Address is blank

  • Contact Person is blank

However, if I create a new address again from the Customer form, the details start appearing in the Sales Order.

Question

Is there any additional setup required for ERPNext to automatically fetch the customer’s primary address and contact in a Sales Order?

Has anyone faced this issue before?

Thanks in advance for your help.

Have you checked whether the address and contact records are properly linked to the customer and set as the default values? I’ve seen similar behavior before where the records existed but were not selected automatically in transactions. It might also be worth testing with a new customer record to rule out any data issue. Let us know if you find the cause.

Thanks for the suggestion.

I verified that the address and contact records are linked to the Customer/Supplier and are marked as Primary, Billing, and Shipping.

However, when I create a new Sales Order or Purchase Order and select the Customer/Supplier, the address and contact details are not populated automatically.

The only thing that gets fetched is the Territory/State. The following fields remain blank:

  • Customer/Supplier Address

  • Shipping Address

  • Contact Person

If I go back to the Customer/Supplier record and create the address/contact again, then it starts appearing in transactions.

I have also observed the same behavior with records created through Bulk Import.

Am I missing any configuration or following the wrong process for creating addresses and contacts? Is there a recommended way to set up Customer/Supplier addresses so that they are automatically picked in Sales Orders and Purchase Orders?

Any guidance would be appreciated. Thanks!

Hi @Darshan

Am not sure if its a bug or standard behaviour but as a last option you can try client scripts to fetch values

Hope it helps