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)
Syntax
'Declaration
Public Shared Function Create ( _
parentFolder As SPFolder, _
name As String, _
ctid As SPContentTypeId, _
properties As Hashtable, _
bProvisionDefaultContent As Boolean, _
user As SPUser _
) As DocumentSet
'Usage
Dim parentFolder As SPFolder
Dim name As String
Dim ctid As SPContentTypeId
Dim properties As Hashtable
Dim bProvisionDefaultContent As Boolean
Dim user As SPUser
Dim returnValue As DocumentSet
returnValue = DocumentSet.Create(parentFolder, _
name, ctid, properties, bProvisionDefaultContent, _
user)
public static DocumentSet Create(
SPFolder parentFolder,
string name,
SPContentTypeId ctid,
Hashtable properties,
bool bProvisionDefaultContent,
SPUser user
)
Parameters
parentFolder
Type: Microsoft.SharePoint.SPFolderThe SPFolder object to which the [DocumentSet] object is to be imported
name
Type: System.StringThe name of the new DocumentSet object
ctid
Type: Microsoft.SharePoint.SPContentTypeIdThe ID of the content type to use for creating the new DocumentSet object
properties
Type: System.Collections.HashtableThe collection of property values to be assigned to the new fields of the DocumentSet object
bProvisionDefaultContent
Type: System.Booleantrue if default documents will be provisioned for the new DocumentSet object
user
Type: Microsoft.SharePoint.SPUserThe user to set as the Author of the new DocumentSet
Return Value
Type: Microsoft.Office.DocumentManagement.DocumentSets.DocumentSet
Returns DocumentSet
Remarks
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