0

I am working on integrating our e-commerce system with dynamics nav on the backend. I create a customer if it doesn't yet exist. All of the fields seem to stick EXCEPT for 'County.' When I do a Read on an existing customer, County is filled in with the correct data.

Oddly enough, when I create the sales order, neither Ship_To_County, Bill_To_County nor Sell_To_County seem to stick there either.

EDIT

I exposed the Sales Order page as a webservice.

João Bragança
  • 1,353
  • 1
  • 13
  • 29
  • How are you interacting with NAV? Somthing like a codeunit, exposed via web services, that creates a customer record and inserts? – Allanrbo Jul 27 '12 at 14:51

2 Answers2

1

Check the underlying table object. There may be code in the OnInsert or OnModify (for that field) that is overriding whatever you have passed in.

Rob Burke
  • 5,365
  • 4
  • 31
  • 30
  • I am not a navision developer. How would I get to the OnInsert or OnModify for that field? I can view the table in the object designer but that's about it. – João Bragança Jul 27 '12 at 18:52
  • When you are in the object designer for the table, scroll to the bottom of the field list then press F9 to bring up the C/AL Editor window. – Alex Peck Jul 30 '12 at 08:09
  • Nothing happens when I do this. My user is in the super user group. Do I need additional permissions? – João Bragança Jul 31 '12 at 16:36
  • Viewing the C/AL Code is a licenced permission from Microsoft. You will need a developer licence in order to view it. – Jake Edwards Aug 10 '12 at 05:28
0

Turns out this was caused by incomplete data entered into the system. Entering a Zip Code was triggering a look-up in the Post Code table. Only this table had blank entries for County. This caused both city and state to be overridden once the user tabbed out of the field.

The answer is to disable this functionality. Zip Codes do not respect city boundaries (i.e., there can be multiple cities in a zip code), and they don't have to respect state boundaries either. Having the system override what the user entered in makes no sense.

João Bragança
  • 1,353
  • 1
  • 13
  • 29