0

I have created a new custom content type , that have the Built-in Event as it parent, and i want to hide the following columns from my new content type:-

  • Recurrence
  • Workspace
  • All Day Event

but seems they are greyed-out as follow, so i can not hide them:-

enter image description here

can anyone adivce on this please? Thanks

1

If you are using on-premise env. you can use next power shell script to remove fieldref's from content type (or another option - you can set this fields to "hidden"):

$web = Get-SPWeb http://your_portal

$ct = $web.ContentTypes["your_content_type"]

$spFieldLink = New-Object Microsoft.SharePoint.SPFieldLink ($web.Fields["your_field"])

$ct.FieldLinks.Delete($spFieldLink.Id)

$ct.Update()

$web.Dispose()

If this is SPOnline env., you can use jslink's to hide this fields on the forms and list view by the javascript.

  • but why i need to write a power shell script to hide the columns ? this should be available from the content type settings using browser ? – john Gu May 28 '15 at 13:35
  • also can you adivce how i can hide the column from the CT instead of removing the column ? – john Gu May 28 '15 at 13:41
  • also i can not find a way to get the columns id .. can you adivce from where i can get their ids ? – john Gu May 28 '15 at 13:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.