I create calendar recurring tasks with JSOM(SharePoint 2013 on-prem). It works, and I can open this item from "All Events"(not "Calendar") view.
But if opened in "Calendar" view - it gives "item does not exist". If I manually create recurring task - it opens well. But all my programmatically created items give this error:
What I noted - it works Ok if I copy url link and remove everything after ID=n, for example:
http://url/Lists/Calendar/DispForm.aspx?ID=25.0.2017-05-18T09:00:00Z - does not work http://url/Lists/Calendar/DispForm.aspx?ID=25 - opens succesfully
Here is code snippet:
var context = new SP.ClientContext(_spPageContextInfo.webAbsoluteUrl);
var web = context.get_web();
var list = web.get_lists().getByTitle("Calendar");
var ici = new SP.ListItemCreationInformation();
var item = list.addItem(ici);
// set details
item.set_item("Title", "Bob's birthday");
item.set_item("fRecurrence", true);
item.set_item("EventType", 1);
item.set_item("EventDate", '2017-05-18T09:00:00Z');
item.set_item("EndDate", '2099-05-18T09:00:00Z');
item.set_item("RecurrenceData", "<recurrence><rule><firstDayOfWeek>su</firstDayOfWeek><repeat><yearly yearFrequency='1' month='5' day='18' /></repeat><repeatForever>FALSE</repeatForever></rule></recurrence>");
item.update();
// execute query
context.executeQueryAsync(function () {
console.log("Calendar Birthday item successfully added.");
}, function(sender, args) {
console.log("Error in sharepoint jsom: " + args.get_message());
});