none
conversation.gettable() results in Sequence contains no elements RRS feed

  • Question

  •  Hi All,

    This might be an exchange issue but I'm not sure.
    We develop a plugin for outlook 2010 and Exchange 2010. In one exchange only I get the following error when trying to get mail items of the conversation. This happened only on one exchange till now.

     

    START CONVERSATION: FLAT - GetTable() =================TimeStamp: 17:38:23Conv.ID: 6379AEDE38BD43339E4FB799C0E4A928Conv.RowCount: 0================================06 - 17:38:23.363================================++++++++++++++++++Error Message:++++++++++++++++++System.InvalidOperationException: Sequence contains no elements   at System.Linq.Enumerable.Max(IEnumerable`1 source)   at OutlookAddIn1.InspectorWrapper.fillMetadataList(Conversation conv) in C:\Private_Files\Development\WorkMail\LocalRepo\WorkMail\WorkMailAddin\InspectorWrapper.cs:line 540+++++++++++++++END Error Message++++++++++++++++++


    • Edited by Workmail Wednesday, October 9, 2013 12:37 PM
    Wednesday, October 9, 2013 12:26 PM

Answers

  • So what you need to do is to examine the ones where the code works and where it doesn't, and see what's different. Only you can do that, we can't see the items and the values each property on them (and any properties that might be missing).

    Ken Slovak MVP - Outlook

    Wednesday, October 9, 2013 5:00 PM
    Moderator

All replies

  • The error says there are no elements to search. Have you actually looked at whatever you're searching for in the UI to see if there is a conversation?

    If so, use a MAPI viewer such as OutlookSpy (www.dimastr.com/outspy) or MFCMAPI (on codeplex) to look at the items in the conversation and make sure the properties are all set correctly on the items.


    Ken Slovak MVP - Outlook

    Wednesday, October 9, 2013 2:43 PM
    Moderator
  • Sure !
    In outlook I see a conversation with various mail items. However, when my add-on is trying to get the mail items for this conversation it receives this error.
    An important fact I didn't mention is that it happens in 90% of the conversations. Not in all of them !
    Wednesday, October 9, 2013 4:00 PM
  • So what you need to do is to examine the ones where the code works and where it doesn't, and see what's different. Only you can do that, we can't see the items and the values each property on them (and any properties that might be missing).

    Ken Slovak MVP - Outlook

    Wednesday, October 9, 2013 5:00 PM
    Moderator