Ole Albers
Ole Albers

Reputation: 9295

New columns are added to content type, but not document library in sharepoint

I add columns to a content type via code. This works quite well (checking this at "site settings - content types - (my content type))

Now I expected that in the document library which has that content type as its parent these columns are also included automaticly. But that did not happen. Some older columns of that content type are included, but the columns I just added to the content type are not available.

Any idea, what I have to do to add those columns to the document library?

Upvotes: 3

Views: 2796

Answers (2)

Ole Albers
Ole Albers

Reputation: 9295

Ok. I was confused by the naming inside Sharepoint. In the Web-Backend SITE content types are called "content types". LIST content types (eg. from pages) are called "document library". So to achieve what I wanted I had to add an SPLookupField to the Site Content Type and another Lookup to that sites content type column into the list content type.

Upvotes: 1

sssreddy
sssreddy

Reputation: 282

Does the content type element for the document library has Inherit attribute set to TRUE.

Schema Ref: http://msdn.microsoft.com/en-us/library/aa544268.aspx

Upvotes: 1

Related Questions