Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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 successfully, 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">&lt;recurrence&gt;
                                            &lt;rule&gt;
                                                &lt;firstDayOfWeek&gt;mo&lt;/firstDayOfWeek&gt;
                                                &lt;repeat&gt;
                                                    &lt;weekly tu='TRUE' weekFrequency='1' /&gt;
                                                &lt;/repeat&gt;
                                                &lt;repeatInstances&gt;3&lt;/repeatInstances&gt;
                                            &lt;/rule&gt;
                                        &lt;/recurrence&gt;</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

share|improve this question

1 Answer 1

Recurrence events are quite hard to manage. If possible try use SharePoint API first and then use the SOAP. Here is a working ex: http://msdn.microsoft.com/en-us/library/ms434156.aspx

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.