TermStore.CreateGroup method
Creates a new Group object in a TermStore.
Namespace: Microsoft.SharePoint.Client.Taxonomy
Assembly: Microsoft.SharePoint.Client.Taxonomy (in Microsoft.SharePoint.Client.Taxonomy.dll)
Syntax
'Declaration
Public Function CreateGroup ( _
name As String, _
groupId As Guid _
) As TermGroup
'Usage
Dim instance As TermStore
Dim name As String
Dim groupId As Guid
Dim returnValue As TermGroup
returnValue = instance.CreateGroup(name, _
groupId)
public TermGroup CreateGroup(
string name,
Guid groupId
)
Parameters
name
Type: System.StringThe name of the new Group being created.
groupId
Type: System.GuidThe ID of the new Group being created.
Return value
Type: Microsoft.SharePoint.Client.Taxonomy.TermGroup
Exceptions
Exception | Condition |
---|---|
UnauthorizedAccessException | The current user has insufficient permissions to perform this operation. |
ArgumentException | The name parameter is invalid. It either contains invalid characters or is too long. |
ArgumentException | Group names must be unique. |
ArgumentNullException | The name cannot be a null reference (Nothing in Visual Basic) or empty. |
Remarks
The name cannot exceed 255 characters, and it cannot contain any of the following illegal characters: ; " < > | & tab.
In addition, the name must be a unique group name within the current TermStore.
The current user must have ManageTermStore() permission in order to use this method.
CommitAll() must be called in order to save this change to the database.