4

When defining content types in SharePoint 2010, there is a new Inherits attribute. According to the SDK:

The value of this attribute determines whether the content type inherits fields from its parent content type when it is created.

If Inherits is TRUE, the child content type inherits all fields that are in the parent, including fields that users have added.

If Inherits is FALSE or absent and the parent content type is a built-in type, the child content type inherits only the fields that were in the parent content type when SharePoint Foundation was installed. The child content type does not have any fields that users have added to the parent content type.

I'm finding that whenever Inherits=FALSE the content type is deployed internally but can't be seen from the UI. Why is this?

Further to that, what is the point of Inherits=FALSE anyway?

3 Answers 3

2

This attribute first appeared in the RC version.

I'm not sure of the validity of having a custom content type with:

  • an ID which derives from an existing one
  • using Inherits=FALSE.

I'm also not sure if an appropriate error is raised in this scenario (if it is indeed invalid). In the absence of more detailed documentation, I think the only thing we can conclude is to that if you use Inherits=TRUE when creating child content types you'll be fine!

1

As far as my "investigations" into this attribute goes it doesn´t seem to have much effect when you don´t apply the overwrite attribute (with value TRUE), e.g. it makes no effect if I make it TRUE or FALSE. However, if you add the overwrite=TRUE attribute the inherited content type won´t "inherit" any fields from its parent.

As far as I can tell the overwrite=TRUE actually tells SP to add the content type via the object model (into the DB) but when set to FALSE the elements.xml on disc will be used.

It´s a bit confusing but as far as I can see the "best practice" would be to use Overwrite=TRUE in conjunction with Inherits=TRUE|FALSE otherwise it has no real effect.

0

Sounds like this new Attribute is backward compatible with version 3 content type definitions. Inherits=FALSE is how it used to work and Inherits=TRUE is the new way. Does this mean it's no longer necessary to create a correctly formatted ID? Or do you need to follow the format ONLY if Inherits=FALSE.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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