Create ICS Link

Forums Dynamic Forms for SharePoint Create ICS Link

Viewing 3 reply threads
  • Author
    • #18261
      Kim West

      Hi Alexander,
      I am trying to send an email with an ICS link to an item in a recurring calendar series. I realize the ID needs to be ID with EventDate in ISO format, but I haven’t been able to get it to come in with that format. Is there some way of getting the correct ID? It should look like this: 10.0.2017-12-26T17:30:00Z where the series ID is 10.

      Thank you for such an awesome product!

    • #18322
      Alexander Bautz

      Sorry for the late reply. I’ve not used recurring calendar events myself, but from what I can see, the ID parameter is just like you describe when you view a recurring event item. This means you can pull it in like this in the email:


      or if you plan to use some code in custom js you can get it like this:

      var theID = GetUrlKeyValue("ID");


    • #18338
      Kim West

      Hi Alexander,

      Thank you for taking the time to respond, it is much appreciated!

      Yes, it seems like it should be that straight forward, however, I think you can see from the attached screen prints, that when I open the form, it doesn’t display the occurrence ID, it shows only the series ID. That’s why it is giving me a problem. I didn’t try the var yet, but I suspect it will return the same ID. I will give it a shot.

      I am using this formula which correctly creates a link to a calendar item, however I keep getting the whole series ID:


      What is frustrating is that if I open the form by default, SharePoint has a custom command to export that item to a file, so it will do it in the background, but I can’t seem to automate this. If you have any other suggestions, please let me know.


    • #18343
      Alexander Bautz

      Unfortunately it doesn’t look like the event.ics call actually detects / exports the recurrence information at all. Unfortunately this means (as far as I know) that you must build some custom code to do this.

      Unfortunately I cannot find time to do build this for you, but you should be able to build a custom function to call from a button in the DFFS form that exports a file with this information.

      Here is something to start with. Put this in the Custom JS in your form – and create a button to call the function from a HTML section in one of the tabs.

      function downloadFile(){
          var element = document.createElement('a');
          var data = [];
          data.push("PRODID:-//Microsoft Corporation//SharePoint MIMEDIR//EN");
          data.push("SUMMARY;ENCODING=8BIT;CHARSET=utf-8:Recurring test");
          element.setAttribute('href', 'data:text/text;charset=utf-8,' + encodeURI(data.join("")));
          element.setAttribute('download', "calendar.ics");

      Please note that all dates must be pulled from the current item and put in the correct place in the “data” above, and the RRULE must be built according to the one set in the list by running a query to get “fRecurrence” and “RecurrenceData” and formatting it in the correct format – see this page for more info on the SharePoint recurrence format:


Viewing 3 reply threads
  • You must be logged in to reply to this topic.