Creating a New Site Content Type which have the built-in Discussion CT as its parent , will show a discussion item without the subject

sharepoint.stackexchange https://sharepoint.stackexchange.com/questions/199285

Question

I am facing this strange scenario inside my sharepoint 2013 online.

Now i want to create a new discussion list , but i want to hide the Question checkbox column. to do so i follow the recommended appraoch , to not apply any changes to the built-in CTs. so i follow these steps:-

  1. inside the site settings.
  2. i created a new site content type, and i chose the built-in Discussion CT, as its parent.
  3. then i tried to set the Question column as hidden inside the new CT.
  4. but seems the options was disabled. enter image description here
  5. so using SharePoint designer , i set the Question column as hidden inside the new CT.
  6. now i create a new Discussion list, and i add the new custom CT to the list, and then i remove the built-in Discussion CT from the list.
  7. so what i really did is that i should get the same discussion items, but without the question field included.
  8. but the problem is that when i try creating a new discussion item, i got only the body field as follow (where the subject field is not shown):-

enter image description here

so i am not sure what is going on ??

Thanks

Was it helpful?

Solution

When you inherit Content Types, you should inherit as is. Otherwise you'll lose functionality of the default content type and breaks internal dependencies. That's the whole point of inheritance. Either you inherit and add (not remove) features, or you don't inherit at all.

There is a reason why site column properties are grayed out, and "solving" it with SharePoint Destroyer isn't a choise in this case.

In your case you would either have to build new custom site columns as well as a new folder content type that does not inherit from discussion. Another option is simply to use JavaScript or CSS to simply hide the Question boolean site column.

Enable Script

Running SharePoint Online Management Shell lets you easily enable scripting on your Site Collection immediately

Set-SPOsite <SiteURL> -DenyAddAndCustomizePages 0

Reference: Turn scripting capabilities on or off

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top