Error Creating a Sales Quote in Microsoft 365 Business Central: “The field Location Code of table Sales Header contains a value (NEWCASTLE) that cannot be found in the related table (Location)”

Microsoft Dynamics 365 Business CentralOn a recent project I helped a client implement Microsoft Dynamics 365 Business Central. When they started doing UAT, they received an error on sales quotes (and we then verified other sales documents):

Error entering sales quote

The field Location Code of table Sales Header contains a value (NEWCASTLE) that cannot be found in the related table (Location)

It took a while to identify, but the cause of the error was the default Location Code field on the Company Information page; there had originally been a location created called NEWCASTLE, but had been renamed at some point. Usually when you open a record in Business Central and change the number field, all related records are updated to the new number.

It seems that the client had somehow managed to change the the location code, but the Company Information page had not updated:

Company Information page showing the old location code

I am not sure what the client did to get the location code to be wrong on the Company Information page, and some checking in the system of other tables using location code didn’t show any other pages with the same issue.

With the location code corrected, the error went away and they were able to continue testing.

What should we write about next?

If there is a topic which fits the typical ones of this site, which you would like to see me write about, please use the form, below, to submit your idea.

Your Name

Your Email

Suggested Topic

Suggestion Details

Leave a Reply

Your email address will not be published. Required fields are marked *