3

My post is a continue of Expand Recurring Events from a Sharepoint Calendar over WebServices?

The problem is that expanding works while view fields query is null or empty. But since I set up some fields, the response doesn't match expectations.

The Lists.asmx service method,that I use, is

public System.Xml.XmlNode GetListItems(string listName, string viewName, System.Xml.XmlNode query, System.Xml.XmlNode viewFields, string rowLimit, System.Xml.XmlNode queryOptions, string webID)

When I use a viewFields value, presented below, the method doesn't expand recurrence events:

var viewFields = new XmlDocument();
viewFields.LoadXml(@"
    <ViewFields>
        <FieldRef Name='ID' />
        <FieldRef Name='Title' />
    </ViewFields>");

What's wrong with a viewFields?

1 Answer 1

5

The problem is that view fields should contain additional fields EventDate, EndDate, fRecurrence and RecurrenceData. When this items absent, expanding doesn't work. So, if you want to retrieve a Category (for example), you should use the following ViewFields query:

<ViewFields>
    <FieldRef Name='EventDate' />
    <FieldRef Name='EndDate' />
    <FieldRef Name='fRecurrence ' />
    <FieldRef Name='RecurrenceData' />
    <FieldRef Name='Category' />
</ViewFields>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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