none
Instantiate ItemId RRS feed

  • Question

  • I need to pass ItemId (TaskItem.Id etc) through a REST service. This means passing json/xml serialized ItemIds over http(s). Thus I need to construct ItemIds from UniqueId/ChangeKey parameters. The ItemId.ctor only takes UniqueId though. Is there a way past this?
    Thursday, June 23, 2011 11:30 AM

Answers

  • Hi Henning

    Thanks for the response. The ItemIds that I have serialized refer to existing items in the Message Store, in this case Tasks within an accounts Task folder.

    The main reason I am worried about this is that if I list all the Tasks in the accounts store I get multiple Task instances that share the same UniqueId but have different ChangeKeys. I'm curious if the UniqueId is sufficient or do I need to pass a complete ItemId to bind to to get a specific Task in this case? This is problematic as it seems I can store the complete ItemId information (unique and change), but not recreate the ItemId from that information.

    Regards

    Högni

    Also, yes, this is in the Managed API.
    • Marked as answer by Hogni Friday, June 24, 2011 1:39 PM
    Thursday, June 23, 2011 4:03 PM

All replies

  • Hi Hogni,

    if you are referring to the Exchange Managed API, then the answer is: You can't.

    Construct an ItemId from your serialized value and bind to the item using the API. Then you have a fresh instance of the ItemId including the latest changekey.

    Kind regards,
    Henning Krause

    "Hogni" wrote in message news:2501c665-3b2f-4c87-9bb1-3cb7f6998150@communitybridge.codeplex.com...

    I need to pass ItemId (TaskItem.Id etc) through a REST service. This means passing json/xml serialized ItemIds over http(s). Thus I need to construct ItemIds from UniqueId/ChangeKey parameters. The ItemId.ctor only takes UniqueId though. Is there a way past this?

    Thursday, June 23, 2011 1:47 PM
  • Hi Henning

    Thanks for the response. The ItemIds that I have serialized refer to existing items in the Message Store, in this case Tasks within an accounts Task folder.

    The main reason I am worried about this is that if I list all the Tasks in the accounts store I get multiple Task instances that share the same UniqueId but have different ChangeKeys. I'm curious if the UniqueId is sufficient or do I need to pass a complete ItemId to bind to to get a specific Task in this case? This is problematic as it seems I can store the complete ItemId information (unique and change), but not recreate the ItemId from that information.

    Regards

    Högni

    Also, yes, this is in the Managed API.
    • Marked as answer by Hogni Friday, June 24, 2011 1:39 PM
    Thursday, June 23, 2011 4:03 PM
  • Hi,

    the ItemId is uniqe for a specific item. The changekey is used to distinguish different versions of a single item. Are you sure you get the same ItemId for different Items? How do you obtain the ItemIds in the first place?

    Kind regards,
    Henning

    "Hogni" wrote in message news:bf94cf37-a31b-42d6-bde9-de6eec473da8@communitybridge.codeplex.com...

    Hi Henning

    Thanks for the response. The ItemIds that I have serialized refer to existing items in the Message Store, in this case Tasks within an accounts Task folder.

    The main reason I am worried about this is that if I list all the Tasks in the accounts store I get multiple Task instances that share the same UniqueId but have different ChangeKeys. I'm curious if the UniqueId is sufficient or do I need to pass a complete ItemId to bind to to get a specific Task in this case? This is problematic as it seems I can store the complete ItemId information (unique and change), but not recreate the ItemId from that information.

    Regards

    HögniAlso, yes, this is in the Managed API.

    Thursday, June 23, 2011 4:22 PM
  • Hi,

    In my haste I seem to have missed the difference of a single character in the base64 string.

    Sorry to bother you with this one :)

    Regards, Högni

    Friday, June 24, 2011 1:39 PM