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

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 _
) As DocumentSet
'Usage
Dim parentFolder As SPFolder
Dim name As String
Dim ctid As SPContentTypeId
Dim properties As Hashtable
Dim bProvisionDefaultContent As Boolean
Dim returnValue As DocumentSet

returnValue = DocumentSet.Create(parentFolder, _
    name, ctid, properties, bProvisionDefaultContent)
public static DocumentSet Create(
    SPFolder parentFolder,
    string name,
    SPContentTypeId ctid,
    Hashtable properties,
    bool bProvisionDefaultContent
)

Parameters

  • bProvisionDefaultContent
    Type: System.Boolean

    true to provision the default content for the DocumentSet object; otherwise, false.

Return Value

Type: Microsoft.Office.DocumentManagement.DocumentSets.DocumentSet
The new DocumentSet object.

Remarks

This version of the Create method always provisions default contents for the content type , if there are any. It tries to assign any values found in the hashtable to the appropriate fields in the new DocumentSet object. The values are copied to the new object only if they are valid fields in the content type. Values for unknown fields are ignored.

See Also

Reference

DocumentSet Class

DocumentSet Members

Create Overload

Microsoft.Office.DocumentManagement.DocumentSets Namespace