0

how to get termset description using javascript. i get the term object but with not information about the description :

getTerm: function (termName,termId) {

    var ctx = SP.ClientContext.get_current();
    var taxSession = SP.Taxonomy.TaxonomySession.getTaxonomySession(ctx);
    var termStore = taxSession.getDefaultSiteCollectionTermStore();

    var termSets = termStore.getTermSetsByName(termName, 1033);  //Default Language

    var term = taxSession.getTerm(termId);
    ctx.load(termSets);
    ctx.load(term);
    ctx.executeQueryAsync(
        function () {
            console.log(term);
            console.log(String.format('Name: {0}', term.get_name()));
            console.log(termSets);
            //$('.tooltiptextF').innerText() = term;
        },
        function (sender, args) {
            console.log(args.get_message());
        });

}
1
  • 1
    it will be like term.get_description() Jan 23, 2019 at 12:37

1 Answer 1

2

To get the description, you need to use it as term.get_description().

It is available as a method and not as property unfortunately.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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