Outlook Integration Problem

jelittlejohnjelittlejohn Posts: 61Member
I have recently upgraded a client from NAV 5.0 to NAV 2009. They have been using outlook integration through multiple upgrades. However after this upgrade, I am getting the following error:

"An error has occurred during the synchronization process. You can find the error details in the log file. Please contact your System Administrator."

After a lot of attempts, I was able to enable the log file. The following nullreference error is listed in the log file:

Info: 10/6/2010 4:31:38 PM [6] Releasing Application object...
Error: 10/6/2010 4:31:38 PM [6] Dump of exception type 'System.NullReferenceException'
Message: Object reference not set to an instance of an object.
Stack trace: at Microsoft.Dynamics.NAV.OLSync.NAVSyncAddIn.Synchronization.MessageParser._ProcessOutlookItem(XPathNavigator outlookItemElement, SynchronizationSchema synchronizationSchema, NavisionSynchronizationEntity navisionSynchronizationEntity, OutlookSynchronizationEntity outlookSynchronizationEntity, EntryIdStorage entryIdStorage, Boolean isConflictResolution)
at Microsoft.Dynamics.NAV.OLSync.NAVSyncAddIn.Synchronization.MessageParser.GetNextMessagePortion()
at Microsoft.Dynamics.NAV.OLSync.NAVSyncAddIn.Synchronization.Common._ProcessNavisionData(MemoryStream incomingStream)
at Microsoft.Dynamics.NAV.OLSync.NAVSyncAddIn.Synchronization.Common.DoSynchronization(BackgroundWorker worker, DoWorkEventArgs e)

I have tried everything that I can think of to get around this issue. Has anyone seen this or have any ideas where I can turn. If I could see the source code that produces the error, I feel like I could figure it out but I don't suppose that is possible. Any ideas would be appreciated. I have search the internet for help with no success.

Thank you in advance.
Jack Littlejohn
Clemson, SC

Comments

  • krzychub83krzychub83 Posts: 120Member
    Hi
    I saw this error before, but I don't remember why... What would I do? After each step try to run the synchronization:
    1. Make sure to have all updates at the database and current Outlook AddIn version (PartnerSource)
    2. Try to delete the relation field 'No. of Elements' from the Outlook Synch. User Setup (on Tasks and Appointments).
    3. Try to reset the Entities (Outlook Synch. Entities) and register them one more time in ChangeLog. You will not be able to do it without deleting them from Outlook Synch. User Setup.
    4. Delete all users entities (Outlook Synch. User Setup, leave only Cont_SP) . Then setup the Outlook Synchronization in Outlook. If it will be working then add one by one another entities to the synchronization. You will see which Entity mess up the process.
    5. Give us feedback, so we could try to help You more.

    PS: Many problems appear because of the language code, but You probably are working on US version... If not try to set up the Entities in English and then add the GLOBALLANGUAGE(1033) in the NASHandler (CU 1).
  • jelittlejohnjelittlejohn Posts: 61Member
    Here's is an update after your advice. First, let me say that my client is only synchronizing contacts, both person and company. They have no need to to synch tasks or appointments or anything else. Also, I have been working off and on with this issue for a couple of months since the upgrade. It is not absolutely critical to their operation but it is becoming more of a priority as so much time has passed. Anyway, during the time I have been working on it, I got the idea that part of the issue was the volume of data being synched. This isn't the most logical idea but it lets you know why I went into the Outlook Synch. User Setup table and changed the Last Synch. Date field to just two days ago. That is where I was at when I began working with your suggestions.

    I tried al of your suggestions with no success. Then I removed both records (Person and Company Contacts) and added them back one at a time. I found that Company contacts would synch but that Persons would not. I looked at the data in the Change Log Entry table to try and find any peculiar data that might be causing the problem with no success. Then I went back to the Entity Card and looked at the Fields for each. I saw that there were lines that referenced the Zip Code and Country/Region table. I looked through the data and saw that one of the zip codes from the change log was not entered correctly in the Zip Code table. I began to think that the problem was due to that reference in the Entities fields coming back empty occasionally and thus causing the nullreference in the Outlook Add-In. So I removed the references and instead set those Field lines up to send whatever data was in the Contact table directly to the corresponding Outlook fields when in synched. This did not work so I restored the default fields and started over.

    Then I turned to google and searched and searched again. Finally I found a blog on the subject that implied that the was a corrupt link in the defaut Fields for the Entities and that if I deleted all the field lines and added them back manually one by one, it would solve the problem. I did this and it WORKED! Ther Person entity that did not work successfully synched. I was very excited and went back into the Outlook Synch. User Setup table and changed the Last Synch. Date back to the date a couple months agao when the issue started after the upgrade. Everything seemed to be working but when the progress bar was about 3/4 accross, I got the same error again.

    The errors that are in the log fiel are different now, however. They are also inconsistent which is new. I got the following three at various times:

    Error: 10/8/2010 4:09:14 PM [6] Dump of exception type 'System.ArgumentNullException'
    Message: Value cannot be null.
    Parameter name: type
    Stack trace: at Microsoft.Dynamics.NAV.OLSync.NAVSyncAddIn.OutlookModelProvider.OutlookFactory._RetrievePlugIn(Object innerObject, Type innerObjectType)
    at Microsoft.Dynamics.NAV.OLSync.NAVSyncAddIn.OutlookModelProvider.OutlookFactory.CreateOutlookItem(Object innerItem, Type innerItemType)
    at Microsoft.Dynamics.NAV.OLSync.NAVSyncAddIn.OutlookModelProvider.OutlookItems.GetItemById(String entryId)
    at Microsoft.Dynamics.NAV.OLSync.NAVSyncAddIn.Synchronization.MessageParser._ProcessOutlookItem(XPathNavigator outlookItemElement, SynchronizationSchema synchronizationSchema, NavisionSynchronizationEntity navisionSynchronizationEntity, OutlookSynchronizationEntity outlookSynchronizationEntity, EntryIdStorage entryIdStorage, Boolean isConflictResolution)
    at Microsoft.Dynamics.NAV.OLSync.NAVSyncAddIn.Synchronization.MessageParser.GetNextMessagePortion()
    at Microsoft.Dynamics.NAV.OLSync.NAVSyncAddIn.Synchronization.Common._ProcessNavisionData(MemoryStream incomingStream)
    at Microsoft.Dynamics.NAV.OLSync.NAVSyncAddIn.Synchronization.Common.DoSynchronization(BackgroundWorker worker, DoWorkEventArgs e)

    Error: 10/8/2010 4:19:36 PM [5] Dump of exception type 'System.Runtime.InteropServices.COMException'
    Message: You don't have appropriate permission to perform this operation.
    Stack trace: at Microsoft.Dynamics.NAV.OLSync.OutlookProxy.UserProperties.Add(String Name, OlUserPropertyType Type, Object AddToFolderFields, Object DisplayFormat)
    at Microsoft.Dynamics.NAV.OLSync.NAVSyncAddIn.OutlookModelProvider.OutlookItem.SetUserProperty(String propertyName, Object newValue, OlUserPropertyType propertyType)
    at Microsoft.Dynamics.NAV.OLSync.NAVSyncAddIn.Synchronization.MessageParser._ProcessElement(SynchronizationSchema synchronizationSchema, NavisionSynchronizationEntity navisionSynchronizationEntity, String synchronizationEntityCode, OutlookItem item, XPathNavigator elementNavigator, String navisionRecordId, ProcessedItemStatusStruc& processedItemStatusStruc)
    at Microsoft.Dynamics.NAV.OLSync.NAVSyncAddIn.Synchronization.MessageParser._ProcessOutlookItem(XPathNavigator outlookItemElement, SynchronizationSchema synchronizationSchema, NavisionSynchronizationEntity navisionSynchronizationEntity, OutlookSynchronizationEntity outlookSynchronizationEntity, EntryIdStorage entryIdStorage, Boolean isConflictResolution)
    at Microsoft.Dynamics.NAV.OLSync.NAVSyncAddIn.Synchronization.MessageParser.GetNextMessagePortion()
    at Microsoft.Dynamics.NAV.OLSync.NAVSyncAddIn.Synchronization.Common._ProcessNavisionData(MemoryStream incomingStream)
    at Microsoft.Dynamics.NAV.OLSync.NAVSyncAddIn.Synchronization.Common.DoSynchronization(BackgroundWorker worker, DoWorkEventArgs e)

    Error: 10/8/2010 4:22:04 PM [5] Dump of exception type 'System.Reflection.TargetInvocationException'
    Message: Exception has been thrown by the target of an invocation.
    Stack trace: at System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters)
    at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
    at System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args, CultureInfo culture)
    at Microsoft.Dynamics.NAV.OLSync.NAVSyncAddIn.OutlookModelProvider.OutlookObject.GetProperty(String propertyName)
    at Microsoft.Dynamics.NAV.OLSync.NAVSyncAddIn.Synchronization.MessageParser._ProcessElement(SynchronizationSchema synchronizationSchema, NavisionSynchronizationEntity navisionSynchronizationEntity, String synchronizationEntityCode, OutlookItem item, XPathNavigator elementNavigator, String navisionRecordId, ProcessedItemStatusStruc& processedItemStatusStruc)
    at Microsoft.Dynamics.NAV.OLSync.NAVSyncAddIn.Synchronization.MessageParser._ProcessOutlookItem(XPathNavigator outlookItemElement, SynchronizationSchema synchronizationSchema, NavisionSynchronizationEntity navisionSynchronizationEntity, OutlookSynchronizationEntity outlookSynchronizationEntity, EntryIdStorage entryIdStorage, Boolean isConflictResolution)
    at Microsoft.Dynamics.NAV.OLSync.NAVSyncAddIn.Synchronization.MessageParser.GetNextMessagePortion()
    at Microsoft.Dynamics.NAV.OLSync.NAVSyncAddIn.Synchronization.Common._ProcessNavisionData(MemoryStream incomingStream)
    at Microsoft.Dynamics.NAV.OLSync.NAVSyncAddIn.Synchronization.Common.DoSynchronization(BackgroundWorker worker, DoWorkEventArgs e)
    Inner exception: System.Runtime.InteropServices.COMException (0x80004005): The operation failed.


    My client does have one user defined field in the Outlook Contact folders that is being synched. At the end of work yesterday, I was trying to determin if that might be where my problems were coming from but I didn't get very fqar with that before the end of the day.

    If anyone has any ideas, they would be greatly appreciated. Does anyone know of a way to take a look at the source code from the Outlook add-in? Obviously that would make these errors in the log file much, much more helpful.

    Again, any thoughts or ideas would be greatly appreciated.
    Jack Littlejohn
    Clemson, SC
  • wicwic Posts: 86Member
    @savatage: link dead (ok 5 years later :-k )

    Same problem here with anbv2015. I'll try the tips "link of default fields".

    But if anything new appears, thanks in advance.

    br
    Chris
    #### Only one can survive ######
  • jacksoncharliejacksoncharlie Posts: 11Member
    I am facing the same problem.

    Any solution here?
  • suraj92291suraj92291 Posts: 49Member
    Outlook collections contain an incorrect translated value for links.

    To resolve the issue, you can do the following:
    1. remove all TASK and APP entities from Outlook Synch User Setup
    2. select Outlook Synch Entities
    3. select Code and press F6
    4. select APP
    5. select Outlook Collection other then Recipients
    6. press F6 and select Links manually and press OK
    7 select Code and press F6
    8. select TASK
    9. select Outlook Collection
    10. press F6 and select Links manually and press OK
    11. reenter the TASK and APP entity for the selected Users in the Outlook Synch User Setup
    12. register changes in Change Log
    “Any fool can know. The point is to understand.”
    ― Albert Einstein
Sign In or Register to comment.