I've created a custom site content type that extends from Event. But I can't figure out how to hide the "All Day Event" and "Recurrence" columns for all lists using my custom content type.
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It only takes a minute to sign up.Sign up to join this community
No Code Solution (without Powershell and SharePoint Designer) to "hide Recurrence field" or "hide AllDayEvent field":
You cannot do this with the UI, but you can do it with PowerShell or C# code. The internal names of the columns are
fAllDayEvent and the property you want to set is
Hidden. So you can update the associated FieldLinks of the Content Type with code like this (PowerShell):
$ctype = $myList.ContentTypes["Event"] $ctype.FieldLinks["fRecurrence"].Hidden = $True $ctype.FieldLinks["fAllDayEvent"].Hidden = $True $ctype.Update()
The fields can be hidden at the content type level using SharePoint Designer.
I had to set Showindisplayform to false also
$web = Get-SPWeb "https://sitename" $list = $web.Lists["List Name"] $ctype = $list.ContentTypes["Content Type Name"] $ctype.FieldLinks["fRecurrence"].Hidden = $true $ctype.FieldLinks["fRecurrence"].ShowInDisplayForm = $false $ctype.Update()
Here's how I did it in SharePoint Online: I created a new site content type, but I based it off the List > Item content type. I added the content type to the calendar, then I added from the existing site or list columns. I didn't include Recurrence. Sorted!