Handling Recurring Events

Hi All,
I'm developing software to integrate our systems with Exchange and have setup notification listeners for changes in an individual's calendar.
Because the "Deleted" event isn't being fired when an item is deleted from the users calendar, I'm instead using the modifed event to handle it all. When the event is fired this triggers another function which uses the following code to determine
if the appoinment exists:
Private Sub ExchangeModified(id As String)
Dim props As New PropertySet(BasePropertySet.IdOnly, AppointmentSchema.Subject)
Dim appt As Appointment = Nothing
Try
appt = Appointment.Bind(service, New ItemId(id), props)
appt.Load()
Catch ex1 As Microsoft.Exchange.WebServices.Data.ServiceResponseException
' object doesn't exist
Catch ex As Exception
Throw ex
End Try
If appt Is Nothing Then
DeletePortalAppointment(id)
Else
UpdatePortalAppointment(id)
End If
End Sub
If the appointment is found then the UpdatePortalAppointment() method is called which updates the database for our backend systems, otherwise delete the appointment from the database.
However when single instances of reccurring events are deleted from the calendar, Appt returns the ReccurringMaster appointment not the single deleted event.
Is there a way to force the single occurance to return not the master?
Thanks

check this
http://sharepoint.stackexchange.com/questions/23221/rest-api-expand-recurring-calendar-events
http://itblog.wolthaus.net/2011/12/rest-filter-datetime/
http://coder87.wordpress.com/category/sharepoint/sharepoint-2013/

Similar Messages

  • O365 Calendar query - cannot identify recurring events

    I am having trouble finding a way to efficiently handle recurring events through the O365 API. There
    does not seem to be a straightforward way to identify if an event recurs.
    I am using the O365 API to display calendar events within a specified day on my web app. The user
    picks a day, and my app displays the events for that day mirroring what is shown in OWA. I am querying the calendar events endpoint (../Me/Calendar/Events) and filtering the results using $filter in the query to narrow the response down to events for that
    day.
    However, this approach does not catch recurring events since the query only returns original event
    objects, not their recurrences.
    To solve that problem, I was hoping to query that same endpoint and filter off of the "Recurrence"
    property. I found that this property is always null. However, if I query a specific event using its ID (../Me/Calendar/Events(<event id>)), the response includes everything I need to reconstruct the recurrence pattern (i.e. frequency, day of week, #
    of occurrences, etc.).
    Although this gives me a way to handle recurring events, it is very inefficient to loop through each
    event to check for recurrences. This option is impractical since I would have to check all events ever created.
    Has anyone else come across this and is there a good way of handling recurring events through the
    O365 API?

    I found another property called "Type" which is of model
    Microsoft.Exchange.Services.OData.Model.EventType. The value "SeriesMaster" indicates that the event recurs, while "SingleInstance" is a one-time event. I tried using O365's $filter to filter the query as shown below
    ...<api_endpoint>?$filter=Type eq Microsoft.Exchange.Services.OData.Model.EventType'SeriesMaster'
    This query returns no values back.
    My other option, which is to get all events and filter on this property, will work and is much better than the previous option I posted above, but impractical for a user with many events.
    Is there a way to filter on this property via http query?

  • AppleScript and Recurring Events

    I'm trying to create an AppleScript that will, essentially, e-mail every event for the week to Remember The Milk so that, on the iPhone, I can pull up Appigo's To Do and get an overview of everything I have to do for the day-- both RTM tasks and iCal events. For all non-recurring events, I'm in great shape.
    The problem, of course, is the way iCal handles recurring events and start dates. Because it considers the start date to be only the first occurrence of a recurring event, they're excluded when start dates are used to get only those events that occur within a specific timeframe.
    I can get all of my recurring events rather easily (although if anyone knows of better way than +...whose recurrence is not ""+ I'd be in your debt), but I don't want to sync every instance of the event. When regular appointments are canceled/rescheduled, I don't want to have to change them in multiple locations.
    Is there a way to get AppleScript to work with only a single occurrence of a recurring event? (Or, preferably, several single occurrences, considering that I've got anywhere between ten and thirty recurring events, depending on the week.)
    I had the thought of, before syncing every week, deleting any previous occurrence of a recurring event, but the script prompts me for the number of days I want to sync each time it runs, and I can foresee wanting to sync two or three weeks at a time, in which case simply deleting the event doesn't really solve the problem anyway.
    null

    Several lines of the “broken” script seem to be badly written, for example:
        set root_Folder to rootFolder as alias -- rootFolder instead of root_Folder
        set events_Folder to events_Foler as alias -- Foler instead of Folder
    Message was edited by: Pierre L.

  • How do i get calendar syncing recurring events from outlook to iphone to handle daylight saving time

    When I sync recurring events of my PC Outlook on to the iPhone calendar they appear one hour later during summer i.e. between Mar 26th and October 27. I have a weekly thing every wednesday at 8pm that appears at 9pm in summer - so outlook seems to be sending the info in UTC time but the IPhone isn't compensating for summer time.

    What do you mean "correctly". If I enter a recurring (weekly) event in Outlook at say 8pm every Monday from February till December, then Outlook calendar propagates it at 8pm every Monday from February till December, and I can see it on each Monday regardless of whether it's standard time or summer time. However when I sync with the iPhone calendar through iTunes it transmits just the start date/time and end date, and the iPhone then recreates the series of events (provable because it creates occurences that I have deleted on Outlook). However it propagates the UTC time at the start date, and gets confused by the change to Summer Time in March (and Ocotber). The iphone "corrects" the (UTC) time for Summer Time so it starts at 8pm, all summer the event appears at 7pm, and goes back to 8 in November. I have tested across both boundaries - if a recurrence starts in summer time at 8pm then from November it gets an hour later, 9pm. And you can't solve it by turning off Local Time handling on the iPhone because then all individual events through the summer are an hour out. This is a bug.
    Workaround - enter separate recurrent events for each time period, so in a calendar year 3 events: Jan-end March, April-end October, Nov-Dec

  • In iCal 8.0, how do I change a single event of a recurring event?

    I am using Yosemite. I have a recurring monthly event for Payroll on the 25th. But, when the 25th falls on a weekend, I change it to the previous Friday.
    To make this change, I drag the recurring event to that Friday. A popup says it will change all recurring events to that date.
    How do I just change a single event and leave the future recurring events as is?

    Without seeing your page, this seems less like a template problem and more of a design strategy problem.
    You should be building flexible pages that can handle increased content, text-sizes, image sizes, etc...
    CSS height property is a restriction in all but IE browsers.  Either remove height property from your content areas or consider using a more flexible min-height.
    More on min- and max- height & widths --
    http://www.quirksmode.org/css/width.html
    Hope that helps,
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    www.alt-web.com/
    www.twitter.com/altweb
    www.alt-web.blogspot.com

  • Setting recurring events in calendar

    I have an I phone 4. I am trying to set recurring meetings that occur for example; on the second Wednesday of every month. On the repeat selection, there is no option for that. I find this very odd as many professionals have recurring events and meetings that would need to be scheduled this way.
    The only workaround I see is to add it to my desktop Outlook calendar which does have this type of recurring event.

    The easiest way, unfortunately, is to make that kind of recurrance in the calendar app in your computer then sync it to the ipad
    the ipad calendar app handles a lot of repeat patterns, but not that one.

  • Recurring Events not gets all data in a given month in C#

    Help me about this. I cannot get all the records of recurring events in Calendar. Even using <Month> ,<Year>. it doesn't give the all records. that happens when adding no end date of recurrence.
    ex. i want to filter all records on the 10-01-2018 by its month but it appears like in different result range of date. cause i've tried creating an event in calendar with recurrence of Daily weekday=true and no end date. then i don't why it doesn't give the
    correct result and just tried this date as sample. 
    here's the image of what trying to get:
    https://social.msdn.microsoft.com/Forums/getfile/621163
    here's the data showing when getting it.
    http://community.office365.com/cfs-file.ashx/__key/communityserver-discussions-components-files/154/0841.img.jpg
    Here's the code:
    var list = xWeb.Lists.TryGetList("TestCalendar");
    var oQueryBookings = new SPQuery();
    oQueryBookings.CalendarDate = new DateTime(2018,10 ,1);
    oQueryBookings.ExpandRecurrence = true;
    SPListItemCollection oCollBookings = null;
    string strViewField = "<FieldRef Name='RecurrenceID' />" +
    "<FieldRef Name='Duration' />" +
    "<FieldRef Name='Title' />" +
    "<FieldRef Name='EventDate' />" +
    "<FieldRef Name='EndDate' />" +
    "<FieldRef Name='Location' />" +
    "<FieldRef Name='Category' />" +
    "<FieldRef Name='Description' />" +
    "<FieldRef Name='fRecurrence' />" +
    "<FieldRef Name='RecurrenceData' />" +
    "<FieldRef Name='fAllDayEvent' />" +
    "<FieldRef Name='TimeZone' />" +
    "<FieldRef Name='EventType' />" +
    "<FieldRef Name='UID' />" +
    "<FieldRef Name='XMLTZone' />" +
    "<FieldRef Name='LinkTitle'/>";
    oQueryBookings.ViewFields = strViewField;
    string strQuery =" <Where>" + 
    " <DateRangesOverlap> " + 
    " <FieldRef Name=\"EventDate\" /> " + 
    " <FieldRef Name=\"EndDate\" /> " + 
    " <FieldRef Name=\"RecurrenceID\" /> " + 
    " <Value Type=\"DateTime\" IncludeTimeValue=\"TRUE\"> " + 
    " <Month /> " + 
    " </Value> " + 
    " </DateRangesOverlap> " + 
    " </Where> " ;
    oQueryBookings.Query = strQuery;
    oCollBookings = list.GetItems(oQueryBookings);
    if (oCollBookings.Count > 0)
    DataTable objDatatable = new DataTable();
    objDatatable = oCollBookings.GetDataTable();

    Hi,
    Per my understanding, you might want to get all the recurring events within a specific month using C#.
    Here is working code demo about getting recurring events by month for your reference:
    public static void getRecurringEvents()
    using (SPSite site = new SPSite("http://sp"))
    using (SPWeb web = site.RootWeb)
    SPQuery query = new SPQuery();
    query.ExpandRecurrence = true;
    query.Query = "<Where><DateRangesOverlap><FieldRef Name=\"EventDate\" /><FieldRef Name=\"EndDate\" />" +
    "<FieldRef Name=\"RecurrenceID\" /><Value Type=\"DateTime\">" +
    "<Month />" +
    "</Value></DateRangesOverlap></Where>";
    //get the events in the specific months
    query.CalendarDate = DateTime.Now.AddMonths(-1);
    SPListItemCollection calendarItems = web.GetList("/Lists/Calendar1").GetItems(query);
    foreach (SPListItem item in calendarItems)
    Console.WriteLine(item["Title"] + ": starts "
    + item["EventDate"].ToString() + " and ends "
    + item["EndDate"].ToString());
    It will return all the recurring events of last month:
    Thanks
    Patrick Liang
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • My calendar on my iPhone 4 erases all data over a month old except for recurring events.  How Do I get it to keep the info and not erase calendar events?

    My calendar on my iPhone 4 erases all data over a month old except for recurring events.  How Do I get it to keep the info and not erase calendar events?

    Settings>Mail, Contacts, Calendars>Calendars>Sync>All Events.
    Note: If you're using a work Exchange account, the administrator my have restricted your options for this setting.

  • How can I get all of my calendars and recurring events to synch via iCloud with my iPad2?

    Not all of my recurring events sych via the iCloud with my Mac and IOS devices - most specifically my iPad2. For example, my anniversary appears on my Mac and my iPhone, but not on my iPad2.
    I notice that when I click on "Calendars" when the iCal app is open in my iPhone I get 2 lists of calendars - one that is labled "On my iphone" and the other that is labled "iCloud". The same two lists appear in the iCal app on my Mac. But on my iPad2 the only list that appears is "iCloud".
    Can anyone help with this issue?

    Welcome to the Apple community.
    Contacts aren't backed up and therefore aren't restored from a back up either. They are synced with the cloud, so after you have restored your device you should be able to sign back into your account and turn syncing back on again. If you need to check if your contacts are in the cloud, go to iCloud.com on a computer.

  • How do I add a recurring event to repeat on the fifth recurring day of the month, for example, an event that only happen on the fifth Sunday of the month for those months that have a fifth Sunday?

    How do I add a recurring event to repeat on the fifth recurring day of the month, for example, an event that only happen on the fifth Sunday of the month for those months that have a fifth Sunday?

    Create one on the first Tuesday, select repeat/monthly and take the option at the bottom.

  • Why is ical adding multiple alerts to my recurring events?

    I have searched for this issue in the support topics but can only find very old threads with links to apps that do not work.  My recurring events in ical are all of a sudden getting many many alerts added to them.  Every once in while I try deleting the event and creating a new one, or deleting the extra alerts for all future events and YET THEY KEEP COMING BACK.  It's super annoying when I am getting 10 reminders for one event and have to clear each one of them.  PLEASE HELP!

    Thanks Malcolm.I'm afraid this issue started for me after updating to iOS6!

  • Outlook recurring events not showing in calendar

    Syncing my iPhone to MS Exchange.
    I see in Outlook 2010 calendars, all the recurring events I have.
    In particular, I see some birthdays in the current week, but on my iPhone 4s, running IOS 5.1, I only see a couple.
    More explicitly, there are 2 birthdays on the day that I am writing this question, only one shows on the iPhone.
    Also, one for tomorrow does not show, nor does an anniversary 2 days after that.
    There is no obvious reason for some to show and others to not show.
    Additionally, birthdays do not show up in 'Day' view, only in 'List' and 'Month' view.
    I have tried deleting my Exchange account and re-adding it.
    I have changed all birthdays from 'Private' to 'Normal' confidentiality
    I have tried editing events which don't show on the iPhone, in an attempt to make them appear.
    I can see appointments I create on the iPhone, in Outlook within seconds.
    I delete a test appointment in Outlook and it will disappear on the iPhone.
    I am at a loss.
    An explanation, or preferably, a fix, would be appreciated.
    EDIT:
    I found that 'recurring events which are ALL Day Events' do not show on the iPhone.
    However, I can search for the event and find it, even though it does not display!

    Yes, all of my recurring events that do sync were created years ago in Outlook and I had no problem syncing them to my Blackberry Bold way back when. Initially when I got my iphone 4, everything synced both ways and then this year I got an iPad and intitally everything synced with it via iTunes/outlook with no problem. I've only noticed this problem within the last month or so and it drove me crazy. I reset both my ios devices but I refuse to uninstall and reinstall Outlook or iTunes. I've seen tons of posts on here that say it afffects the cloud, exchange servers and itunes so it's not just us. I've sent feedback to Apple and received no response. Others have too. Apple is aware of it and doesn't have a clue what to do about it. It now affects other events for me so I'm thinking maybe it has to do with default reminders and other things between Outlook and the ios devices. Maybe and update to iTunes or ios6 will change that, who knows. I still love my iPhone and would't go back to Blackberry; it's just way to slow for me.

  • Changes made to recurrent events in ical and/or iphone 4 will not sync since upgrading phone to iOS 5. I have an old macbook pro and it is running snow leopard OS 10.6.8. I have a minimum of 40 recurring events per week, several of which change.

    since upgrading phone to iOS 5. I have an old macbook pro and it is running snow leopard OS 10.6.8. I have a minimum of 40 recurring events per week, several of which change. I use the information to schedule future appointments based on those changes and it's causeing a major problem to not have the changes sync. Any help would be very much appreciated.

    Did you try to replace the calendar info on the phone with the one on your Mac? You can find this option in iTunes/Info pane, Advanced section.

  • HT2513 Problem Creating Recurring Events in iCal.

    Hello.
    I'm having some issues creating a recurring event in one of my iCoud Calendars on iCal.
    If I create a new event then go in and change the recurrance, time, and name it stays in my iCal for a few seconds then defaults back to a basic appointment with no name, time, or recurence. I then need to go back into the event and reprogram everything. It will then save the changes.
    Its a little annoying as I need to reprogram the even and save it twice.
    Has anyone had this problems, and could offer assistance?
    Thank You!

    The same thing happened to me! I'm in another discussion thread about this and it seems many people have the same problem and it all started about a week ago

  • Deleting a recurring event in iCal

    Situation; iphone 5 recurring event wont delete.  looking at same calendar on a synced PC (work) the event is not there at all. 
    If you are having trouble deleting a recurring event in iCal try this:
    on your iphone change the event "alert" or "show as" setting on one of the events in the future.  The event that wasn't showing on the PC outlook calendar magically shows up now.  delete it from the PC by opening it and choosing the X delete for all occurances (if its asks).
    Now open the event in iCal and you should see the Accept Maybe Decline option at the bottom - choose decline.  you may have to do this on several dates, but that should delete the event.
    Hope this helps.

    pedfogog,
    ... or whoever may find this post in need of assistance as I was.
    I just had this same problem and successfully deleted ALL event (past and future)instances by :
    1. Click on any instance of the event in the calendar
    2. Select "Delete" from the iCal toolbar "Edit" menu.
    3. The iCal propmt asked me to choose to delete all or just the one instance.
    4. Naturally, select to "Delete all occurrences"
    I am running OS 10.6.8   iCal 4.0.4

Maybe you are looking for