1

I´m trying to retrieve information about recurring events from sharepoint 2010 using client object model. I have retrieved "Recurrencedata" and "fRecurrence" but i can not see these information in them.

2 Answers2

1

There are three key fields for the recurrence in sharepoint calendar lists. Two of them you already mentioned. "fRecurrence" is an boolean field which says item is recurring or not. "RecurrenceData" is the field which stores the all details about recurrence in xml format. A simple sample is

<recurrence><rule><firstDayOfWeek>su</firstDayOfWeek><repeat><daily dayFrequency="1" /></repeat><repeatForever>FALSE</repeatForever></rule></recurrence>

Third one is the "EventType" field which stores info about list type(normal, recurring, recurrence exception etc.)

You can get detailed information about subject from here

To read entries from a list use:

ClientContext ctx = ClaimClientContext.GetAuthenticatedContext(targetSite)
var query = new CamlQuery();
query.ViewXml = @"<View Scope='Recursive'><Query><ViewAttributes Scope='RecursiveAll' /><OrderBy><FieldRef Name='ID' /></OrderBy></Query></View>";
var listItems = list.GetItems(query);
ctx.Load(listItems);
ctx.ExecuteQuery();

To read relevant fields use

string recurrenceData = listItems[0]["RecurrenceData"];
haltunbay
  • 615
  • 6
  • 15
1

Haltunbay is absolutely right, but since the question is quite general, I would like to share my experience in working with Recurrence Events on SharePoint. After a long research I found, that there is no way to retrieve recurrence events like individual series using Client Object Model. But Lists.asmx web service works very well. So, may be this links will help you:

Expand Recurring Events from a Sharepoint Calendar over WebServices

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

Community
  • 1
  • 1
Warlock
  • 7,321
  • 10
  • 55
  • 75