DocumentSet.Create Method (SPFolder, String, SPContentTypeId, Hashtable, Boolean, SPUser)

Creates a new DocumentSet object.

Namespace:  Microsoft.Office.DocumentManagement.DocumentSets
Assembly:  Microsoft.Office.DocumentManagement (in Microsoft.Office.DocumentManagement.dll)

public static DocumentSet Create(
	SPFolder parentFolder,
	string name,
	SPContentTypeId ctid,
	Hashtable properties,
	bool bProvisionDefaultContent,
	SPUser user
)

Parameters

parentFolder
Type: Microsoft.SharePoint.SPFolder

The SPFolder object to which the [DocumentSet] object is to be imported

name
Type: System.String

The name of the new DocumentSet object

ctid
Type: Microsoft.SharePoint.SPContentTypeId

The ID of the content type to use for creating the new DocumentSet object

properties
Type: System.Collections.Hashtable

The collection of property values to be assigned to the new fields of the DocumentSet object

bProvisionDefaultContent
Type: System.Boolean

true if default documents will be provisioned for the new DocumentSet object

user
Type: Microsoft.SharePoint.SPUser

The user to set as the Author of the new DocumentSet

This method will try to assign any values found in the hashtable to the appropiate fields in the new DocumentSet object, the values will be copied to the new object only if they are valid fields present in the Content Type, values for unknown fields will be ignored.

The ctid parameter must be a content type that inherits from the base DocumentSet content type

Show: