I have a course booking system that allows users to add a course date and some of the details to their Outlook calendar. It is set up using a ICS file on our server that pulls through the required data.
It has been requested that we have a 'remove from Outlook calendar' button available for courses that have been cancelled. This could be either on the site itself, or the button could be included in an email to the user's Outlook account, if this works better. Is this possible?
I can't find any information about this online, but am perhaps searching for the wrong things.
Thanks in advance.
I have managed to find a solution to this now, after some trial and error, so will post it here to share with others who may be struggling over the same thing.
Firstly I changed the way the UID is generated so that it is something I can re-generate but is unique to the course instance (so I used variables related to the userID and courseID). If the UID matches another UID within the Outlook calendar then it won't know which to delete.
In the ICS file I added; STATUS:CANCELLED
Changed the sequence to 1 (The sequence to delete it must be higher than the sequence no on the 'add to calendar' ICS file. All current ICS files from our site are set to 0.); SEQUENCE:1
and I changed the method too; METHOD:CANCEL
And this now does the trick.