Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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());
- });
- }
Add Comment
Please, Sign In to add comment