Term.Delete Method
Deletes this Term object and its descendents from the TermStore object.
Namespace: Microsoft.SharePoint.Taxonomy
Assembly: Microsoft.SharePoint.Taxonomy (in Microsoft.SharePoint.Taxonomy.dll)
Syntax
'Declaration
Public Overrides Sub Delete
'Usage
Dim instance As Term
instance.Delete()
public override void Delete()
Exceptions
Exception | Condition |
---|---|
UnauthorizedAccessException | The current user has insufficient permissions to perform this operation. |
TermStoreOperationException | This operation is invalid in the orphaned terms TermSet.The operation failed. |
Remarks
Deleting a source Term when it is still reused elsewhere will move the source term to the orphaned TermSet object, and the Term becomes an orphan. Orphan terms cannot be deleted directly. When all reused term objects are deleted, the orphan is automatically deleted.
Use of this method requires TaxonomyRights.EditTerm permissions. Call the CommitAll() method to save this change to the database.