Welcome to my personal blog, All the information in this bogs is my ideas,findings and thoughts on .Net, Asp.Net and SharePoint.
ALL POSTING ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND
When we add a field to the site content type SharePoint doesn't push-down those changes to the document library and the list level. The below code sample is for push-down all the changes to document libarary and the list level.The sample code from WSS 3.0 SDK doesn't seem to be working :)
SPField field = spWeb.Fields[“YourNewField”]; //you can pick one from the site column collection for create a new one.
SPFieldLink fieldLink = new SPFieldLink(field);
SPContentType contentType = spWeb.ContentTypes[“Site Level Content Type”];
contentType.FieldLinks.Add(fieldLink);
contentType.Update(true);
Anonymous comments are disabled