TermSetItem.ReuseTerm method

Creates a new reused Term object below this TaxonomyItem object based on a sourceTerm.

Namespace:  Microsoft.SharePoint.Taxonomy
Assembly:  Microsoft.SharePoint.Taxonomy (in Microsoft.SharePoint.Taxonomy.dll)

public Term ReuseTerm(
	Term sourceTerm,
	bool reuseBranch
)

Parameters

sourceTerm
Type: Microsoft.SharePoint.Taxonomy.Term

The source Term for the reused Term

reuseBranch
Type: System.Boolean

Reuse the TermSetItem and its child Terms

Return value

Type: Microsoft.SharePoint.Taxonomy.Term
The newly created reused Term

ExceptionCondition
UnauthorizedAccessException

The current user has insufficient permissions to perform this operation.

TermStoreOperationException

This operation is invalid in the Orphaned Terms term set.The operation failed.

TermStoreOperationException

Keywords are not allowed to be reused.

TermStoreOperationException

Reusing a deprecated Term is disallowed.

TermStoreOperationException

Terms can not be shared multiple times in the same term set

TermStoreOperationException

The target term set can not be the Keywords term set or the orphaned terms term set.

TermStoreOperationException

This operation is invalid in the Orphaned Terms term set.The operation failed.

ArgumentNullException

The source Term is a null reference (Nothing in Visual Basic) or invalid

Reuse a term from a different term set to become a child of the current TermSetItem. The target term set cannot be the Keyword or Orphaned Term Set. Keywords cannot be reused.

The current user must have TaxonomyRights.EditTerm permission in order to use this method.CommitAll() must be called in order to save this change to the database.

Show: