2

I am writing an application which synchronises users' calendars into a local store. I am using Exchange Web Services (EWS) and the SyncFolderItems method to pull down the changes. This all worked perfectly until I discovered the synchronised items don't include "Recurring" appointments.

Another stackoverflow article suggested that this is because they are "virtual". It does include the "master" appointment though. The thing is, that's fine. I am rendering the appointments on a third party calendar that supports recurrance, so I just need to store the recurrance info from the appointment and I can translate that onto my calendar, so it will show the correct information.

However, when I check the "IsRecurring" field, it says it's false when it is clearly a recurring appointment. Anybody come across this?

Chris
  • 8,030
  • 4
  • 37
  • 56
nickthompson
  • 229
  • 1
  • 5
  • 13

2 Answers2

2

I have noticed the same thing since I was trying to filter out recurring items. I ended up querying for and checking the CalendarItemType(http://msdn.microsoft.com/en-us/library/exchange/aa494158(v=exchg.140).aspx) instead to determine if the item was part of a recurrence or not, this property is queryable in the SyncFolderItems shape.

  • 1
    Same for me when calling GetItem. CalendarItemType is the reliable field, not IsRecurring – Jan Doggen Dec 10 '12 at 11:37
  • Could you please elaborate how to query CalendarItemType field with EWS managed API? – Alexander Jan 28 '15 at 12:04
  • Unfortunately this codebase is no longer available to me, I do not however recall having to do anything special to query this particular property. For some properties black magic may be required, in those cases, the incantation of choice for me was OutlookSpy http://www.dimastr.com/outspy/home.htm – Johan Karlberg Mar 16 '15 at 11:34
  • @JohanKarlberg Sorry for bothering you about an ancient project, but do you remember how you found which ModifiedOccurrence had actually been modified to cause it to be included in the syncFolderItems call? It seems to return every occurrence that has ever been modified, not just the one that was edited for me. No worries if you'd rather just forget all about EWS though! – Ted Jan 12 '18 at 10:46
  • Sorry, but I have no idea. It's been five years since I last had to integrate against EWS, and I have repressed most of what I once knew on the topic. – Johan Karlberg Jan 29 '18 at 12:22
1

Seems that IsRecurring doesn't always get set right (grr...). Solution is to check the CalendarItemType field (mentioned above) and if it's equal to RecurringMaster -- Then IsRecurring should be true. Other possible values include:

  • Single
  • Occurrence
  • Exception

Though in the case of SyncFolderItems it will either be RecurringMaster or Single I believe.

BadPirate
  • 25,802
  • 10
  • 92
  • 123