SOLVED

Question about the EventDate / StartDate column of the Event Content Type

Steel Contributor

I need to display a list of events using custom formatting (formatting view) that I will put into a list web part (modern). Because I can't refer to the OOB events calendar list with this web part, I've created a new custom list and attached the Event content type.

 

In this custom list, the Start Date internal name is "StartDate" and the GUID is {64cd368d-2f95-4bfc-a1f9-8d4324ecb007}.

However, in the OOB events calendar list, the Start Date internal name is "EventDate" with the same GUID as "StartDate" (This I don't understand how it can be done..).

 

The issue that I have with my custom formatting view is calling the owssvr.dll service to create an .ics file. 

My start date/time info is not correct in the .ics file. My guess is that it is looking for the "EventDate" instead of the "StartDate" (Does not look like I can specify the start and end date/time when calling the service)

 

"href": "='@currentWeb' + '/_vti_bin/owssvr.dll?CS=109&Cmd=Display&List={fff74f7d-eb5c-48bc-a83e-4d62854cf8e8}&CacheControl=1&ID=' + '[$ID]' + '&Using=event.ics'" 

 

Any idea how I could use the "EventDate" in my custom list?

 

Thanks.

 

Note: Here's an example: 

2019-12-13 11_26_14-Calendrier.png

 

 

 

1 Reply
best response confirmed by Martin Coupal (Steel Contributor)
Solution
I was able to create an "EventDate" column in the event content type at the list level. However, if I try to hide the StartDate column in the event content type, it will thow an error when I create a new item. So I just let it optional and renamed the StartDate column to "Other Date". Now, it creates the .ics correctly...

1 best response

Accepted Solutions
best response confirmed by Martin Coupal (Steel Contributor)
Solution
I was able to create an "EventDate" column in the event content type at the list level. However, if I try to hide the StartDate column in the event content type, it will thow an error when I create a new item. So I just let it optional and renamed the StartDate column to "Other Date". Now, it creates the .ics correctly...

View solution in original post