Hi All,
I am creating sales orders in NAV through Odata REST web services, I set "ship_to" details in the JSON of the POST request i.e., City, State, Zip Code and Country. NAV tends to pick up the details which appear 1st on the Zip Codes table based on Zip Code and City. Since same zip code has different city names, I'm facing issue with address mis-match on the sales order and tax calculation.
For instance the order details I set in JSON are as follows:
{
"Ship_to_City": "Sandstone",
"Ship_to_County": "MN",
"Ship_to_Post_Code": "55072",
"Ship_to_Country_Region_Code": "US"
}
Details about zip code 55072 (from google): 55072, Postal code in Minnesota, Cities: Sandstone, MN, Markville, MN, Cloverton, MN, Duxbury, MN, Kingsdale, MN, Groningen, MN
So same zip code has different city names.
Zip Code Table in NAV: has 2 entries for 55072
Code City Country
55072 Markville US ----- NAV always picks this details
55072 Sandstone US ----- when I try to post with this line details
After creating the sales order, NAV returns the following:
{
"Ship_to_City": "Markville",
"Ship_to_County": "MN",
"Ship_to_Post_Code": "55072",
"Ship_to_Country_Region_Code": "US"
}
Due to this, the customer order details and what's in NAV do not match up which in-turn causes tax miscalculation in NAV.
From my little understanding of NAV:
1. While creating a new entry in zip codes table, the combination of Zip code and City name is treated as primary/unique key.
2. When I post a sales order, NAV gets all the entries for a zip code and sorts it based on city name to pick the first one from the list.
Please help me resolve the issue.
Thanks in Advance!
Kishore.