O'Reilly logo

Microsoft SharePoint 2010 Developer's Compendium: The Best of Packt for Extending SharePoint by Carl Jones

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating custom content type using an object model

In the previous recipe, we extended a content type using an XML schema. This can get pretty difficult as Visual Studio does not provide ways to debug the XML schemas. Instead of using the xml schema method, you can always use object model APIs to create the content type. In this recipe we will do just that.

For this recipe, we will create a new content type called Project Proposal that has four custom columns Amount, Department, Project Start Date, and Project End Date. The Department field is a choice type where you can select the department to which the project belongs. The Amount field is of currency type and the Project Start Date and the Project End Date are of DateTime type. The content ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required