Question

I copied a document set from a 2010 farm to a 2013 farm (using Explorer on both document libraries). On the destination document library, the document set was converted to a folder content type. I changed the content type to be a document set adding the information from source document library. All the metadata is attached to the folder, but it is still represented as a folder, and has no document set start page. What do I do to get the Document Set working as a document set and not as a folder? Create a document set at destination and just copying the file? Or is there something better to make this work properly?

Was it helpful?

Solution

Set the DocumentSet.Folder.Item.ProgId to "SharePoint.DocumentSet". Right now it will be empty. See this for more information: http://www.sharepointnadeem.com/2011/08/sharepoint-2010-document-sets.html

UPDATE Here is the sample PowerShell code. I haven't however tested it:

$web = Get-SPWeb http://yoursite
$list = $web.Lists["YourList"]
$docSetName = "YourDocSetName"
[Microsoft.SharePoint.SPFolder]$targetFolder = $web.GetFolder($list.RootFolder.ServerRelativeUrl + "/$docSetName")
if ($targetFolder.Item.ProgId -eq "")
{
    $targetFolder.Item.ProgId = "SharePoint.DocumentSet"
    $targetFolder.Item.Update()
}
Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top