Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

You are forced to select a content type for a file when you save the file to a document library in SharePoint Server 2010


View products that this article applies to.

Summary

Assume that a document library is configured to have multiple content types in Microsoft SharePoint Server 2010. When you save a new file to the document library for the first time, you are prompted to select a content type for the file.

↑ Back to the top


Resolution

To resolve this issue, apply the following hotfix updates: 
  • 2536591 Description of the SharePoint Foundation 2010 hotfix package (sts-x-none.msp): June 30, 2011
  • 2544019 Description of the SharePoint Server 2010 hotfix package(dlc-x-none.msp): June 28, 2011
After you apply these hotfix packages, set SPList.ForceDefaultContentType to True for the document library. To do this, use the following PowerShell command:
PS > $web = Get-SPWeb -Identity http://SPServer
PS > $list = $web.GetList("/Documents")
PS > $list.ForceDefaultContentType = $true
PS > $list.Update()

Note The hotfix packages add a new ForceDefaultContentType property to the SPList object. The default value for the property is false, and the property can be only changed programmatically.
  • If the ForceDefaultContentType property is set to false. You are prompted to select a content type for the file when you save the file that is created through Office 2010 client to a SharePoint document library. From a programmatic perspective, the Lists.GetListContentTypes web service returns a collection of all the content types in the SPList.ContentTypescollection.
  • If the ForceDefaultContentType property is set to true, the file that is added as a new item is assigned the default content type for a list. Therefore, you are no longer prompted to select a content type.  From a programmatic perspective, the Lists.GetListContentTypes web service returns only the first content type which is the default content type for the list in the SPList.ContentTypescollection.

↑ Back to the top


Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

↑ Back to the top


Keywords: kbqfe, kbsurveynew, kbexpertisebeginner, kb

↑ Back to the top

Article Info
Article ID : 2552995
Revision : 3
Created on : 9/25/2018
Published on : 9/25/2018
Exists online : False
Views : 297