Wednesday, March 6, 2013

Create Custom Content Type in SharePoint 2010

Content Management is an integral part of SharePoint 2010. It helps organize your documents, items and records in a way you have control over its life cycle. We can define what fields we want to use in content types and their data types. Also we can apply validations on the fields within a content type. This blog post describes creation of a custom content type within the site collection and using it within the document library.
Step 1: Create a content type “Vouchers” with some metadata columns.
Go to Site Settings > Site Content Types (under Galleries) > Create.

Step 2: Create two additional columns within the content type.


Step 3: Create a document library named “Payment Vouchers”.


Step 4: Enable use of Content types within the library.
Go to Library Settings > Advanced Settings (Under General Settings) and select Yes for Content Types.

Step 5: Add our custom content type to this library.
Click on Add from existing site content types and select our newly created content type “Vouchers” from the list and click Add. Also, I will remove the Document content type available in this library by default to avoid any confusion.

Once we add the Vouchers content type and remove the Document content type, the New Item ribbon button in our library will look like below:

Step 6: Now we can upload some documents to this library.
Click on Upload Documents and browse your file to upload. Once the upload is done, you will be asked to fill in the metadata for our content type Vouchers.

If you note, we made Voucher Date as mandatory, which is marked as a red asterisk. After filling in proper metadata, click on Save to complete the upload. Content types can be very helpful when you have thousands of documents in the same library and you have many types of documents in it, so creating separate content types for them and saving them under their appropriate values with their respective metadata values can be very helpful within the organization. Also, content types are very useful when you have a similar kind of documents within your site in different libraries, so you can create a content type and re use it in all the libraries. Implementation of Retention schedules also is one key benefit of using own custom content types.

No comments: