Immediate Solutions for Everyday Business Problems

SharePoint Problem Solved: Amnesia Problem: Multiple Content Types on Libraries

Original Publication Date: Thursday, November 5, 2009
Filed Under: Content Type, Document Management, Libraries and Lists, Nick Grattan, Workshops
SharePoint User Level: Power User

 

Nick GrattanGuest Author: Nick Grattan
Nick Grattan Consultancy Limited
http//nickgrattan.wordpress.com

In this blog post I describe a problem whereby document libraries having multiple content types use the default content type when documents are saved regardless of the selected content type.

Well, thanks to Kevin at Dublin City Council, (that’s Dublin, Ireland) here’s a solution to this problem. It’s all to do with how you define the template for the content type using “Advanced Settings” for a content type:


Problem Solved

First, if you “Upload a new document template” the problem described above does not occur. The correct content type will always be selected regardless of how many content types there are associated with the document library. However, your document template is not under version control and becomes more difficult to update using this option.

I normally use the “Enter the URL of an existing document template” and add the URL to a document library containing content type templates (let’s call it “Content Type Templates Library”). That way, if the content type template is updated in this document library the new version will immediately be used. This is the situation where the wrong content type will be selected.

To solve the problem (and this is where Kevin comes in), you need to associate the content types with the “Content Type Templates Library”. The documents representing the content type templates need to have the content type they are being used in. Let me give an example:

Say you’ve got two content types: “CT1″ and “CT2″ and these use document templates called “DT1.doc” and “DT2.doc” respectively. The documents “DT1.doc” and “DT2.doc” are stored in a document library called “Content Type Templates Library”. Now, you need to associate content types “CT1″ and “CT2″ with “Content Type Templates Library”. Further, “DT1.doc” must use “CT1″ and “DT2.doc” must use “CT2″.

Once this has been setup, the content types “CT1″ and “CT2″ can be associated with a document library in which users will create documents. Now, new documents created by users will have the correct content type associated with them.

Nick GrattanGuest Author: Nick Grattan
Nick Grattan Consultancy Limited
http//nickgrattan.wordpress.com

Nick Grattan is an expert on Microsoft SharePoint development, administration and workflow process engineering. He is an experienced Microsoft .NET application architect and designer and delivers many very successful workshops on new and emerging technologies such as Windows Workflow Foundation and Microsoft Office SharePoint Server 2007.  Nick, is a director of Nick Grattan Consultancy Limited, was the Microsoft MSDN Regional Director for Ireland from 1997 to 2008, and has clients all over  Europe. Nick is the author of several books including “Windows CE 3.0 Application Programming” (Prentice Hall PTR, 2000), “Pocket PC, Handheld PC Developers Guide with eMbedded Visual Basic” (Prentice Hall PTR, 2002) and “Windows CE Development for Dummies” (John Wiley & Sons Inc, 1998); many articles for publications such as the “Developer Network Journal” and white papers for Microsoft Corporation.

Spread the word...
  • Digg
  • Facebook
  • StumbleUpon
  • Google Bookmarks
  • LinkedIn
  • Reddit

Notify me of comments to this article:


Comments

One Response to “SharePoint Problem Solved: Amnesia Problem: Multiple Content Types on Libraries”

  1. Ben McMann on November 5th, 2009 3:36 pm

    Can you include screen shots with this? The tutorial isn’t that clear.

Leave a Reply