none
EWS API 1.2.1 Get CleanGlobalObjectId RRS feed

  • Question

  • Hi

    I'm creating appointments using the managed API and would like to retrieve the CleanGlobalObjectId property after calling the save method.

    Does anyone have an example how to retrieve this using the API?

    Many thanks,

    Lee

    Thursday, August 9, 2012 10:42 AM

Answers

  • Hi 

    I worked through your sample and the article and came up with this:

    ExtendedPropertyDefinition propertyDefinition = new ExtendedPropertyDefinition(DefaultExtendedPropertySet.Meeting, 0x23, MapiPropertyType.Binary);
    
    Service.ExchangeService.LoadPropertiesForItems(new List<Item> { appointment }, new PropertySet(BasePropertySet.IdOnly, propertyDefinition) { });
    

    Again, many thanks,

    Lee

    • Marked as answer by Lee Diggins Friday, August 10, 2012 9:05 AM
    Friday, August 10, 2012 8:41 AM

All replies

  • I have thank you, though this uses EWS directly not the managed API.
    Thursday, August 9, 2012 12:37 PM
  • Hi Lee,

    I use this principle too...with managed API :-)

    Let me give you an example.

    You can directly use: GetObjectIdStringFromUid method from the topic

    for search you can do this:

    SearchFilter.IsEqualTo filter = new SearchFilter.IsEqualTo
    {
     PropertyDefinition = new ExtendedPropertyDefinition
       (DefaultExtendedPropertySet.Meeting, 0x03, MapiPropertyType.Binary),
     Value = GetObjectIdStringFromUid(iCalUid) //Hex value converted to byte and base64 encoded
    };
    
    ItemView view = new ItemView(1) { PropertySet = new PropertySet(BasePropertySet.FirstClassProperties) };
    
    return service.FindItems(WellKnownFolderName.Calendar, filter, view).Items.FirstOrDefault() as Appointment;


    Please mark my answer if I helped you out :-)
    • Edited by eL-Prova Thursday, August 9, 2012 2:03 PM
    Thursday, August 9, 2012 2:02 PM
  • Hi 

    I worked through your sample and the article and came up with this:

    ExtendedPropertyDefinition propertyDefinition = new ExtendedPropertyDefinition(DefaultExtendedPropertySet.Meeting, 0x23, MapiPropertyType.Binary);
    
    Service.ExchangeService.LoadPropertiesForItems(new List<Item> { appointment }, new PropertySet(BasePropertySet.IdOnly, propertyDefinition) { });
    

    Again, many thanks,

    Lee

    • Marked as answer by Lee Diggins Friday, August 10, 2012 9:05 AM
    Friday, August 10, 2012 8:41 AM