I'm looking for the best way to implement sending invitations from a SharePoint list of events.
- Create an Event
- Creation of a repeating event
- Exception recurrences
- Delete an event
I was exploring options:
- Create an event handler to send the mail, but I have trouble generating the ICS format
- Use the option to export out of the box with some programming to make it more friendly
What approach would you recommend? Thanks in advance.
One possible solution I've been evaluating is the proposal in this blog.
Deliver meeting request from Sharepoint Calendar programmatically
Here they have developed a library (iCal.cs) that takes an item from a Events SharePoint list and creates the ical file. It is a good starting point, but there are points that still require further development:
- Managing the list of attendees. In particular the addition or removal.
- How to handle cancellations.
It should also be noted that this solution is based on a full calendar export and not the individual appointment.
Note: I do not say that this is the ideal solution. But it is a very good example of the problem being solved.
Sample exporting a complete SharePoint Calendar
The file "iCal Exporter 1.0 Source.zip" from The Community Kit for SharePoint helps to undestand de complexity of SharePoint Event List.
Understanding the SharePoint calendar
A must-o-read article accessing SharePoint calendars via the object model with so many different types of events – normal events, all-day events, recurring events, recurrence exceptions, and deleted instances
Understanding the SharePoint calendar and how to export it to iCal format
- I know how to write event receiver
- I know how to send the email
- What are looking for is some code to translate events from calendar list to ical because this list has some complexity and diferents types of events
- If you look in this blog you can see iCal.cs. This library take the complexity of the translation, but I think for a complete calendar translation. I am looking someting like this but to add in same event receivers. This library shows the complexity behind. And my intention is not to develop it from scratch.
- Event receivers in sharepoint calendar list are not "natural". For instance: when you modify an exception of a recurring appointment, an item for the exception is created. And the recurring item changes. Two events are triggered. And you must decide in which event send the iCal file. There are a lot of combinations. Because of event type, exceptions, and more things
- It is very strange here are not something out of the box. Because MS seems to have a way to generate Ical. Since there is a tab "custom action" in the event screen. Look here: Export (.ical) Individual Events from SharePoint Calendar