Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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.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 
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