Acumatica 2026 R1; Build 26.101.0225 on a dev sandbox.
Source: Dynamics GP company database, via the MSSQL data provider and a simple SQL view.
CREATE VIEW dbo.Warehouses
AS
SELECT rtrim(LOCNCODE) LOCNCODE,
rtrim(LOCNDSCR) LOCNDSCR,
rtrim(ADDRESS1) ADDRESS1,
rtrim(CITY) CITY,
rtrim(STATE) STATE,
rtrim(ZIPCODE) ZIPCODE ,
'US' AS COUNTRY
FROM dbo.IV40700
GO


Importing warehouses from a SQL view with an import scenario. Some new warehouses imported, while many others failed with "'Country' cannot be empty", even though the data is functionally identical and Country is US on every row. Updates to existing warehouses worked fine. [screenshots]
Workaround: setting a default country on the branch (as suggested elsewhere on this forum) fixed it. Mapping Branch explicitly, before the address fields, should also work.
Cause (with thanks to Claude AI): in INSiteMaint, RowUpdated<INSite> overwrites CountryID on the inserted address with the branch's country whenever the branch changes, without checking whether a country was already set:
record.CountryID = (string)branch.Cache.GetValue<Branch.countryID>(branch.Current);With no country on the branch, the imported value is replaced with blank. I'm not sure what decides which rows hit the branch change. It looks like state carried between rows during the import.
Also worth knowing: FieldUpdated<Address.countryID> clears State and Postal Code, so Country must be mapped before them.

