Expanding of Recurring Events from a Sharepoint Calendar doesn't work for a ViewFields Query

孤者浪人 提交于 2019-12-10 17:47:43

问题


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:


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>


来源:https://stackoverflow.com/questions/12108589/expanding-of-recurring-events-from-a-sharepoint-calendar-doesnt-work-for-a-view

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!