C#, Sharepoint - GetDescription() & SetDescription() of the Taxonomy Term
-
06-01-2021 - |
Domanda
I want to be able to manage the GetDescription() and SetDescription() of the Taxonomy Term(as a managed metadata). In order to get the value of the Description, not of the Label of the Taxonomy Term.
How should I manage these functions?
Any suggestion would be very much appreciated.
Thank you in advance!
Soluzione
using (SPSite site = new SPSite("URL of site"))
{
TaxonomySession taxonomySession = new TaxonomySession(site);
TermStore termStore = taxonomySession.TermStores["MMMD Service"];
Group group = termStore.Groups["Term Group"];
TermSet termSet = group.TermSets["Term Set"];
Term term = termSet.Terms["term"];
term.SetDescription("Test", 1033);
termStore.CommitAll();
}
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a sharepoint.stackexchange