Shail S

Shail S

  • NA
  • 455
  • 76.2k

Getting parent term using JSOM(Sharepoint Online)

May 2 2018 7:24 AM
I have a sharepoint online sitecollection and have created a termset.  
How to get parent taxonomy term from child term using JSOM. I want to get the parent term of a term from the termset that i have fetched. I am using get_parent() but that is not working. 
 
var parent =currentTerm.get_parent();
alert(parent.get_name());
 
 
I have even tried the below
 
var value = SP.Taxonomy.currentTerm.get_parent();
Even this has failed for me.

Is there any other way i can get the parent term using JSOM?

 

Answers (2)