TermSet.Copy method
Creates a copy of the TermSet object under the current parent TermGroup object.
Namespace: Microsoft.SharePoint.Client.Taxonomy
Assembly: Microsoft.SharePoint.Client.Taxonomy (in Microsoft.SharePoint.Client.Taxonomy.dll)
Syntax
'Declaration
Public Function Copy As TermSet
'Usage
Dim instance As TermSet
Dim returnValue As TermSet
returnValue = instance.Copy()
public TermSet Copy()
Return value
Type: Microsoft.SharePoint.Client.Taxonomy.TermSet
A new TermSet object that is a copy of the original TermSet.
Exceptions
Exception | Condition |
---|---|
UnauthorizedAccessException | The current user has insufficient permissions to perform this operation. |
TermStoreOperationException | This operation is invalid in the Orphaned Terms TermSet object. The operation failed. |
TermStoreOperationException | Copying a system TermSet is disallowed. |
Remarks
All Term objects in the current TermSet become reused by the new TermSet. The copied TermSet will have a variation of the original TermSet name, such as having 'Copy of ' prefixed to the name. Copy is not permitted on any system TermSet objects such as the Keywords TermSet or the Orphaned TermSet. The current user must have TaxonomyRights.Edit permission to use this method. Call the CommitAll() method to save this change to the database.