Compartilhar via


Create Lists with Custom Content Types in SharePoint 2010

SharePoint QuickStart Banner

Getting Started with Web Development in SharePoint 2010:  Learn how to create a list and associate it with a new content type.

Applies to: SharePoint Foundation 2010 | SharePoint Server 2010 | Visual Studio 2010

In this article
Create the List
Disassociate the List from a Content Type
Delete the List
Next Steps

Published:  April 2010

Provided by:   Frank Rice, Microsoft Corporation

In this exercise, you create a list in Microsoft SharePoint Server 2010 and associate it with a new content type. Next, you disassociate the list from the content type and then delete the list. To complete this task, you must do the following:

  • Create the List

  • Disassociate the List from a Content Type

  • Delete the List

Note

This Quick Note assumes that you already created a new content type named New Announcements with two fields named Team Project and Company. To learn how to create a content type, see Create Custom Content Types in SharePoint 2010.

Create the List

In this task, you create the list and add the custom content types.

To create the list

  1. Start Internet Explorer and browse to the Web site where you have created the new content type.

  2. In the upper-left corner of the page, click Site Actions and then click More Options.

  3. Click List in the Filter By menu in the Create dialog screen.

  4. Select Custom List.

  5. Type New Announcements as the name and then click Create.

  6. Click List Settings in the SharePoint 2010 ribbon and then under General Settings, click Advanced settings.

  7. Click Yes for Allow management of content types and then click OK.

  8. Under the Content Types section, click the Item content type.

  9. Under Settings, click Delete this content type.

  10. If prompted for confirmation, select OK.

  11. Under the Content Types section, click Add from existing site content types.

  12. From the available site content types list, click New Announcements and then click Add.

  13. Click OK. You should now see the New Announcements content type associated with the New Announcements list.

    Figure 1. New Announcements content type

    New Announcements content type

  14. Click the New Announcements list item.

  15. Scroll down to the Columns section and verify that there is a Team Project and Company column.

    Figure 2. Team Project and Company columns

    Team Project column and Company column

Disassociate the List from a Content Type

In this task, you will disassociate the New Announcements list that you created previously from the new content type called New Announcements.

To disassociate the list from the content type

  1. In the upper-left corner of the page, click Site Actions, and then click View All Site Content.

  2. Under Lists, click New Announcements.

  3. In the SharePoint 2010 ribbon, click the List tab and then click List Settings.

  4. Under the Content Types section, click New Announcements.

  5. Click Delete this content type.

  6. If prompted for confirmation, select OK.

  7. Verify that there are no items listed in the Content Types section.

Delete the List

In this task, you delete the list that you created previously.

To delete the list

  1. In the List Settings page, in the Permissions and Management section, click Delete this list.

  2. If prompted for confirmation, click OK.

Next Steps