0

I would like to delete terms not used in a TaxonomyField on any Item in a Document Library. I am new to CSOM and can't figure out how to proceed on this.

Can you help, please?

1 Answer 1

1
  1. Use the GetAllTerms method of the TermSet object to retrieve all terms.

  2. Use the GetItems method of the List object to retrieve all items. For each item, you can get the value of the TaxonomyField and keep track of the used terms.

  3. Any term that is in the list of all terms but not in the list of used terms is a term not used in any TaxonomyField.

  4. Use the DeleteObject method of the Term object to delete a term.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.