2

Lets say I have two Term Sets named: A & B. In Term Set A I have a term X that i want to reuse in Term Set B. Under X I have some "Child-Terms".

How do i programmatically get the "Child-Terms" of X?

Get Term should do the job if there where two instances of different terms that had the same name. (The job of getting the two instances of X which I could then get the child terms from)

TermCollection tc = session.GetTerms(term.Name, true);

How should I tackle this problem?

Development on SharePoint 2010.

1

Using the sspId from the field on the item I was working on I was able to get the child terms from a Reused Term.

TermStore termStore = session.TermStores.FirstOrDefault(ts => ts.Id == taxField.SspId);                                                        
TermSet termSet = termStore.GetTermSet(taxField.TermSetId);                                                      
Term reusedTerm = termSet.Terms.FirstOrDefault(t => t.Labels.Any(l => l.Value == originalTerm.Name));
reusedTerm.terms <<<<----- here's X

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.