I'm building a Sharepoint service, which allows users to book company's resources, such as conference rooms, etc. The back-end is implemented with standard Calendar list, the front-end uses JavaScript Client OM and Web Services to interact with the list.
Users may want to make their bookings recurring - it means, recurring events are added to the calendar. Users have a chance to change their booking's parameters.
Here's where I'm having some problems.
Suppose, a user has added an event to the calendar, which recurs weekly on Mondays for 5 times. Later, he changes his mind and wants to change booking's Title and date, and wants the booking to recur daily for 3 times.
I'm using Lists.asmx web service to update the Calendar's entry.
Title and Date are updated succesfully, but Recurrence parameters not.
I've inspected the outgoing POST query, which my javascript code makes to the Lists.asmx:
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<UpdateListItems xmlns="http://schemas.microsoft.com/sharepoint/soap/">
<listName>{ --list ID here-- }</listName>
<updates>
<Batch OnError="Return">
<Method ID="1" Cmd="Update">
<Field Name="ID">212</Field>
<Field Name="Title" Type="Text">UpdatedTitle</Field>
<Field Name="EventDate" Type="DateTime" Format="ISO8601">2011-12-06T11:00:00.000Z</Field>
<Field Name="EndDate" Type="DateTime" Format="ISO8601">2011-12-06T11:50:00.000Z</Field>
<Field Name="EventType">1</Field>
<Field Name="fRecurrence">3</Field>
<Field Name="RecurrenceData"><recurrence>
<rule>
<firstDayOfWeek>mo</firstDayOfWeek>
<repeat>
<weekly tu='TRUE' weekFrequency='1' />
</repeat>
<repeatInstances>3</repeatInstances>
</rule>
</recurrence></Field>
</Method>
</Batch>
</updates>
</UpdateListItems>
</soap:Body>
</soap:Envelope>
Here's the response I'm receiving (partially omitted):
<z:row ows_ContentTypeId="0x0102000ADD6CDCF13C09419A66E4F14CFA5654"
...
ows_Title="UpdatedTitle"
ows_EventDate="2011-12-06 11:00:00"
ows_EndDate="2011-12-06 11:50:00"
ows_fAllDayEvent="0"
ows_fRecurrence="1"
ows_EventType="0"
ows_Duration="3000"
...
ows_ID="212"
ows_Modified="2011-12-02 13:13:41"
ows_Created="2011-12-01 10:41:32"
...
The EventType in the response is set to 0, which means, Simple event, and the ows_RecurrenceData
attribute is not present at all.
When I later retirieve this updated Event from the calendar, I see, it's RecurrenceData field is set to null.
Any thoughts, why RecurrenceData is not saved on update? Am I missing something?
ps When adding new Event using the same Web Service, everything is OK with Recurrence