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
parentFolder
Type: Microsoft.SharePoint.SPFolderThe folder that contains the DocumentSet object.
name
Type: System.StringThe name of the new DocumentSet object.
ctid
Type: Microsoft.SharePoint.SPContentTypeIdThe content type identifier on which to base the new DocumentSet object.
properties
Type: System.Collections.HashtableThe properties of the new DocumentSet object.
bProvisionDefaultContent
Type: System.Booleantrue 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.