Outlook Synchronization: Contacts may get assigned to a different company after the contact is updated in the Outlook contact

Outlook Synchronization: Contacts may get assigned to a different company after the contact is updated in the Outlook contact

  • Comments 4

In Dynamics NAV it is possible to have multiple companies that have similar names. This is because Company Name is not a primary key. Person contacts may be assigned to one of the two companies. If one of these contacts is updated from Outlook, the person contact could be assigned to the other similar named company.

Let’s consider the following scenario:

image

As you can see, The Cannon Group PLC exists two times. If we create a new person contact and assign this to the second The Cannon Group PLC (CT000142), the picture would look like this:

image

After synchronization all contacts to Microsoft Outlook, it may sometimes be necessary to update one of the contacts from Outlook. If this is done for the Marco Mels user (CT000143), then after synchronization, the picture would look like this:

image

The reason for this issue is described below:

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 is 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 is not 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 is the wrong one causing all sorts of incorrect behavior.

In order to fix this there are 3 options:

1) Enforce a unique key on the company name. In this particular name have the customer use a sort of convention for companies that have the same name, something like My Company (Berlin), My Company (Hamburg) ... so that names are unique
2) Only modify contacts from Dynamics NAV
3) Add Company No. to the CONT_SP so that the Company No. makes the linked relation unique

image

 

To do so, start up the 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. Do not forget to register the changes in the Change Log!

Drawbacks of this approach:

1) If they want to move a contact to a different company, you need to remember to change the Company No. as well
2) If you want to create a new contact in Outlook, you also need to add the number

Regards,

Marco Mels
CSS EMEA

This posting is provided "AS IS" with no warranties, and confers no rights

Leave a Comment
  • Please add 8 and 7 and type the answer here:
  • Post
  • I have a simple question regarding the synchronization of Contacts into Outlook. It seems that i don't get the email synchronized from NAV to Outlook. But if i create a contact in outlook with an email it gets synchronized into NAV.

    Am I missing something here - seems pretty basic?

    Best Regards

    Lars Tvis

  • Hello Lars,

    Synchronization of E-mails are not part of the Outlook Synchronization solution. But maybe I misunderstood your question? Out of the box it is just the company and person contacts defined in Dynamics NAV and the ToDo's created in Dynamics NAV or created Meetings and Tasks in Outlook.

    Regards,

    Marco Mels

    CSS EMEA

    This posting is provided "AS IS" with no warranties, and confers no rights

  • Hi Marco,

    What i mean is the scenario where i am creating a contact company in NAV. I fill out name, adress, phone no. and E-mail field 102 on table 5050). The contact company gets synchronized into outlook but without the email adress information. Everything else is synchronized as expected.

    I expect the mail adresse entered on the contact in NAV to show up on the contact in Outlook but that is not happening in my setup.

    If i create a new contact in outlook with name, phone no. and email all fields gets synchronized as i expect into the NAV Contact.

    Hope that clarifies what i am asking.

    Best Regards

    Lars Tvis

  • Hello Lars,

    After adding the E-mail address to the Contact card in Dynamics NAV, that E-mail address should also show up in Table 405 Change Log Entry as a change for that specific contact. If it doesn't, the E-mail address won't synch via a normal synchronization from Dynamics NAV to Outlook.

    You need to analyze why table 405 doesn't pick up the change for the E-mail address.

    Regards,

    Marco Mels

    CSS EMEA

    This posting is provided "AS IS" with no warranties, and confers no rights

Page 1 of 1 (4 items)