In the process of developing an internal network using SharePoint online and OData for REST requests, I encountered a challenge when trying to create recurring events. While single events are created successfully, recurrent events seem to be causing some trouble.
After executing the 'add' function, the event is added to the calendar but only as a singular occurrence.
Below is the recurrence string that I have been using:
<recurrence>
<rule>
< firstDayOfWeek > su < /firstDayOfWeek>
< repeat >
<weekly tu='TRUE' we='TRUE' weekFrequency= '1'/>
< /repeat>
< windowEnd >2018-08-22T09:12:26Z< /windowEnd >
< /rule>
</recurrence >
And here is the query that includes the creation of recurring events:
if (newItem["Recurrent"]) {
return new Web(`${this.baseUrl}`)
.lists
.getByTitle(this.baseList)
.items
.add({
"Languages_Active": true,
"Title": newItem["Title"],
"Languages_PT": true,
["Title_" + language]: newItem["Title"],
["Description_" + language]: newItem["Description"],
'Preferences': newItem["Preferences"],
'fRecurrence': newItem["Recurrent"],
'FromLocation': newItem["FromLocation"],
'ToLocation': newItem["ToLocation"],
'StopPoint': newItem["StopPoint"],
'Seats': newItem["Seats"],
'PrivateCar': newItem["PrivateCar"],
'EventDate': newItem["StartDate"],
'EndDate': newItem["EndDate"],
//recurrent event fields
'EventType': 1,
'RecurrenceData': recurrenceString,
'fAllDayEvent': false,
'TimeZone': 0,
})
.then(createResult => {
this.count(listName, country);
this.home(refresh, listName, language, country);
});
Despite successfully creating items, there seems to be an issue with one particular field causing the loader to fail in loading calendar events.
The use of custom recurrence patterns is restricted by SharePoint, leading me to utilize 'spEventsHelpers' for handling recurrent events. Is it possible to switch from custom recurrence to a simple weekly pattern?
Furthermore, why am I unable to see the pattern correctly? I've spent hours trying to identify the problem without success. If you have any insight or similar experiences, please share them. Thank you in advance for your assistance!