I have a custom contenttype. This contenttype is inherited some columns from the OOTB contenttype "ArticlePage". I would like to set one of these columns required in my custom contenttype. How to do that programmatically? I am talking about the column "ArticleStartDate".
SPContentType contentType = curWeb.ContentTypes["Custom CT Name"]; SPField field = contentType.Fields["ArticleStartDate"]; contentType.FieldLinks[field.Id].Required = true; contentType.Update();
Use the FieldLinks property of the contenty type. There are quite a lot of examples explaining using this property. Refer msdn as well : FieldLinks