This project has moved and is read-only. For the latest updates, please go here.

Recurring event saved to Calendar list but not visible in the Calendar view

May 24, 2013 at 6:33 AM
When I use UpdateListItems to save a recurring event to a Calendar it gets saved correctly (the correct radio buttons and values are set) but it is only visible in the All Events view, not the default Calendar view. However, when I open the series up and click on the OK button, it then becomes visible in the Calendar view.

My code is as below:

var xmlData = '<recurrence><rule><firstDayOfWeek>su</firstDayOfWeek><repeat><daily dayFrequency="1" /></repeat><repeatForever>FALSE</repeatForever></rule></recurrence>';
xmlData = htmlEscape(xmlData);

            operation: "UpdateListItems",
            async: false,
            batchCmd: "New",
            listName: "Meeting Room Calendar",
            valuepairs:[["EventDate", "2014-02-03T09:30:00Z"],["EndDate", "2014-08-10T10:00:00Z"], ["Preferred_x0020_Meeting_x0020_Ro", "EAG ST ROOM 1"], ["EventType", "1"], ["fRecurrence", "1"], ["Title", "Test Recurring"], ["fAllDayEvent", "0"], ["RecurrenceData", xmlData]],
            completefunc: function (xData, Status) {
                //Do nothing
Does anyone know how I can make it visible within the Calendar view without having to open the series and click the OK button?
May 24, 2013 at 7:03 AM
It looks like it has only created the series item, but not the individual items - which are being created when I click the OK button for the series.
May 24, 2013 at 2:03 PM
OK I figured it out.

In the value pairs I needed to include UID and GUID ie ["UID", "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"]. This must be so the child items have a way of relating to the parent series.

I generated the guid using the following:

var guid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {var r = Math.random()*16|0,v=c=='x'?r:r&0x3|0x8;return v.toString(16);});

Anyway, works fine now. If anyone has any questions, feel free to ask.