none
Can Items.Restrict be used to search ConversationID RRS feed

  • Question

  • Is the ConversationID like the GlobalAppointmentID in that if you try and use it in the Items.Restrict method you'll get an Invalid Condition returned?

    Microsoft doesn't explicitly tell you that you cannot use the GlobalAppointmentID in a search, but I've found out over time that it cannot be used in the Restrict or Find methods.  I'm wondering if the same applies for the ConversationID.


    NOTE: I'm not going to bother with adding a property to the AppointmentItem to search only for reasons particular to our environment.

    If you have seen it done, please provide a link; I've tried a few ways already ... i'm interested in a proven solution.

    Friday, April 22, 2016 9:11 AM

Answers

  • Yes, PT_BINARY properties cannot be used in Items.Find or Items.Restrict. If using Redemtpion is an option, it has no such limitation:

    set Session = CreateObject("Redemption.RDOSession")
    Session.MAPIOBJECT = Application.Session.MAPIOBJECT
    set Folder = Session.GetFolderFromID(Application.ActiveExplorer.CurrentFolder.EntryID)
    set Items = Folder.Items
    set Msg = Items.Find(" ""http://schemas.microsoft.com/mapi/proptag/0x00710102"" = '0101AA0B6FD92FB311CB2372AA1261D3D81F3B676DB002205EF6CB0239524BA50105C5838501E055BC77023517780601DD4F00D89F83B874F0800109E400' ")
    If not (Msg Is Nothing) Then
      MsgBox Msg.Subject
    End If


    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!


    Friday, April 22, 2016 3:07 PM

All replies

  • Yes, PT_BINARY properties cannot be used in Items.Find or Items.Restrict. If using Redemtpion is an option, it has no such limitation:

    set Session = CreateObject("Redemption.RDOSession")
    Session.MAPIOBJECT = Application.Session.MAPIOBJECT
    set Folder = Session.GetFolderFromID(Application.ActiveExplorer.CurrentFolder.EntryID)
    set Items = Folder.Items
    set Msg = Items.Find(" ""http://schemas.microsoft.com/mapi/proptag/0x00710102"" = '0101AA0B6FD92FB311CB2372AA1261D3D81F3B676DB002205EF6CB0239524BA50105C5838501E055BC77023517780601DD4F00D89F83B874F0800109E400' ")
    If not (Msg Is Nothing) Then
      MsgBox Msg.Subject
    End If


    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!


    Friday, April 22, 2016 3:07 PM
  • Hello German,

    What exactly do you need to implement? What is your goal?

    Most probably there can be another implementation which is not based on the ConversationID property (or any other binary property).


    [custom.development]

    Saturday, April 23, 2016 7:48 PM
  • Thanks for that.  I'll see if I can talk the managers into getting redemption. 
    Tuesday, April 26, 2016 6:55 PM
  • I'm trying to location a deleted AppointmentItem in the "Deleted Items" folder.  It's a long a winding saga.

    In brief, I need to update an external database when meetings that meet a specific set of criteria deleted from Outlook.

    On top of that, I need to make sure that if Exchange is unavailabe that my Add-in makes the database update automatically when Exchange becomes available again.

    What I found was that Items in the Outbox will get moved to the "Sent Items" folder automatically when Exchange comes back online.  This is great for me since I don't have to write any code for that.  I simply subscribe to the "ItemAdd" event handler of the SentItems folder.

    The problem is that if a person declines a meeting, I can no longer call "GetAssociatedAppointmentItem()" because it is no longer available.  However, that AppointmentItem can still be found in the Deleted Items folder.

    Now, the trick is ... how to find that Item and make sure it is the appointment associated with the one in the SentItems Folder.

    I was going to search the Deleted Items folder using either ConversationID, or ConversationIndex ... but these values cannot be used for a search

    My work around was to search using the date range of 1 minute prior and 1 minute after the deletion then do a batch on Subject against CovnersationTopic    (I use ConversationTopic because the Subject on a Cancellation gets the word "Canceled" appened on the subject line)

    It's not the preferred solution, but it's working for now.

    Tuesday, April 26, 2016 7:05 PM
  • Hi GermanH,

    I am glad you have found a working solution, if you have any other issues, please feel free to post in this forum.

    Best Regards,

    Edward


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Wednesday, April 27, 2016 1:27 AM