SharePoint content type: remove columns from parent
I am trying to create a content type that will inherit from the Contact content type (which comes with SharePoint). I need the most fields, but I would like to remove some of them.
Is there a way to remove the fields I don't want using the XML content type definition?
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<ContentType ID="0x01004B56BB872BFE984D9611B5D8CF52CB60" Name="Child Contact" Description="Inherits from Contact" Group="...">
<FieldRefs>
??? What would I put there to remove fields that exist in the parent?
</FieldRefs>
</ContentType>
</Elements>
+2
source to share
4 answers
I suggest you rethink your content type inheritance structure. Define a parent ct containing JUST columns shared by both child ct and add other columns to the corresponding child ct.
Think of it like OO programming, you don't put methods that are ONLY used in subclass B that inherits from class A TO of that parent class A, and in the process makes that method available in all classes inheriting from A, whereas they never not be used there, or worse, misused ...
0
source to share