SharePoint 2010: RemoveFieldRef and Inherits=“TRUE”

独自空忆成欢 提交于 2019-12-03 14:04:34
SpartanDonut

I believe the nature of this issue to be the understanding of how content type inheritance works.

From MSDN (http://msdn.microsoft.com/en-us/library/aa544268.aspx)

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.

If Inherits is FALSE or absent and the parent content type was provisioned by a sandboxed >solution, the child does not inherit any fields from the parent.

I think the key phrase above is "If Inherits is TRUE, the child content type inherits ALL fields that are in the parent including fields that users have added."

This means that in order to accomplish what you set out to do you will have inherits set to false and you will have to include FieldRef elements for all fields you wish to use in your content type.

You make no reference / don't include code for how the content type was added to your list instance. Make sure this has been updated to support the removal or setting of inherits to false.

These sites support what is described here.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!