I'm working on a custom navigation webpart for SP2013 using the JSOM.

Currently, a part of fetching the data from the termstore involves fetching all the terms and then getting data from the respective taxonomy terms:

context.load(term, ['Title', 'FriendlyUrlSegment', 'Terms', 'Parent']);
taxonomyTerm = term.getTaxonomyTerm();

Later on in the code I can access the data from the taxonomy term via


This brings me to two questions:

  • Is this the right way to ask for the properties I want from the taxonomy term?
  • How can I optimize the above request by specifying the fields I'm after for the taxonomy term, how can I see what options I have?

Since SP.Taxonomy.Term exposes CustomProperties property you could replace the line:


with this one:


In order to optimize the request, you could specify explicitly what properties to retrieve for SP.Taxonomy.Term object via SP.ClientContext.load method, for example:


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.