When something is modified from the Outlook side, the information sent by the Outlook Add-In to Dynamics NAV contains all the fields of the changed entry, not only the changed ones. On Dynamics NAV side, there's no validation that checks whether a field has changed or not. Therefore, it updates all the fields that have been sent by Outlook Add-In for a given entry. The company contact is mapped as a linked relation based to Company Name which isn't a primary key. Dynamics NAV receives the Company Name from Microsoft Outlook. The update follows the condition definition and finds the first company with the given company name and uses this one to update the company ID. It can happen that this's the wrong one causing all sorts of incorrect behavior.
In order to fix this there're 3 options:
- Enforce a unique key on the company name. In this particular name have the customer use a sort of convention for companies that've the same name, something like My Company (Berlin), My Company (Hamburg) ... so that names are unique
- Only modify contacts from Dynamics NAV
- Add Company No. to the CONT_SP so that the Company No. makes the linked relation unique
To do so, start up Dynamics NAV client and select Administration, Application Setup, Microsoft Office Outlook Integration, Outlook Synch Entities, press F5 in Code field and select CONT_PERS. Now select Synch. Entity and select Fields. Add a new line and ensure field 50151 is selected and press OK. Furthermore, select User-Defined and save the changes. Don't forget to register the changes in the Change Log!
Drawbacks of this approach:
- If they want to move a contact to a different company, you need to remember to change the Company No. as well
- If you want to create a new contact in Outlook, you also need to add the number