none
Problem getting flag status with Exchange EWS 1.1 (managed) RRS feed

  • Question

  • Subsequent to the post "

    EWS: Set follow-up on an email 

     

    I've been trying to get various mapi properties through the extended property set on an EmailMessage. 

    It works for some (like Mileage or BillingInformation) but not for the flags.

     

    I have the flags defined as below (in decimal):

     

    public const int FlagStatusId = 4240;

            public const int FollowUpIconId = 4245;

            public const int TodoItemFlagId = 3627;

     

    And attempt to retrieve them as follows:

           extendedPropertyDefinitions.Add(new ExtendedPropertyDefinition(FlagStatusId, MapiPropertyType.Integer)); //0x1090 octal - root flag status

                extendedPropertyDefinitions.Add(new ExtendedPropertyDefinition(FollowUpIconId, MapiPropertyType.Integer)); //PidTagFollowUpIcon

                extendedPropertyDefinitions.Add(new ExtendedPropertyDefinition(TodoItemFlagId, MapiPropertyType.Integer)); //PidTagToDoItemFlag

    Then get the emailMessage like this:
     PropertySet set = new PropertySet(BasePropertySet.FirstClassProperties, GetExtendedItemProperties().ToArray());
     var a = EmailMessage.Bind(svc,  new ItemId(uniqueId), set);
    The email comes back with *some* extended properties but not the ones defined above. Am I missing something? Like the DefaultExtendedPropertySet?
    Regards,
    Chris

    Thursday, November 17, 2011 9:21 PM

All replies

  • The one suggestion i would have is to enable tracing in your code and then post the trace messages it looks like what your doing is okay but the best thing to do from a troubleshooting standpoint to look at whats being send the received by the server. These properties will only be set on message that has been marked for followup so on a normal message what you would get is nothing (Eg EWS won't return anything if the message has never been flagged you can create a search filter to find messages that are flagged in this instance).

    Cheers
    Glen

    Monday, November 21, 2011 4:48 AM