Sharepoint 2010 Managed Metadata - Unable to Get Term with TermSet

Having a really aggravating problem using managed metadata in SP2010, where I can get a taxonomy session, Term Store and Term set up fine, but when I try to get a term from a set of terms, I get a TermStoreOperationException that says it "could not be read or write to the database. "

Does anyone know why I can get the Term Set, but not the conditions? I can’t understand why, when they are all in the same database, I can get a set, but not the terms inside it.

The code I'm using is below:

  TaxonomySession txSession = new TaxonomySession(site, true);

  TermStore termStore = txSession.DefaultSiteCollectionTermStore;                

  TermSet termSet = termStore.GetTermSet(TermSetId);
  TermCollection termCollection = termSet.GetTerms("My Term", true);  //exception thrown on this line.

Any ideas or ideas or solutions would be truly appreciated.

Thanks heaps!

+3
1

, Term Set Term:

 TermSet termSet = termStore.GetTermSet(txField.TermSetId);
 Term myTerm = termSet.Terms["My Term"]);

, .GetTerms() - , , SP2010 - RTM, - , ...

+2

Source: https://habr.com/ru/post/1738587/


All Articles