Group.CreateTermSet Method (String)
Creates a new TaxonomyTermSet object in this Group object by using the term store working language.
Namespace: Microsoft.SharePoint.Taxonomy
Assembly: Microsoft.SharePoint.Taxonomy (in Microsoft.SharePoint.Taxonomy.dll)
Syntax
'Declaration
Public Function CreateTermSet ( _
name As String _
) As TermSet
'Usage
Dim instance As Group
Dim name As String
Dim returnValue As TermSet
returnValue = instance.CreateTermSet(name)
public TermSet CreateTermSet(
string name
)
Parameters
name
Type: System.StringThe name of the new TermSet being created.
Return Value
Type: Microsoft.SharePoint.Taxonomy.TermSet
The newly created TermSet object
Exceptions
Exception | Condition |
---|---|
UnauthorizedAccessException | The current user has insufficient permissions to perform this operation. |
TermStoreOperationException | Creating a term set in system Group is disallowed. |
ArgumentException | The name parameter is invalid. It either contains invalid characters, is too long, or conflicts with the name of an existing TermSet in the same Group. |
ArgumentNullException | The name cannot be null or empty. |
Remarks
The name cannot exceed 255 characters, and it cannot contain any of the following illegal characters: ; " < > | & tab.
Additionally the name must be a unique TermSet name within the current Group object.The current user must have TaxonomyRights.EditTermSet permission in order to use this method. Call the CommitAll() method to save this change to the database.