I'm making a spfx webpart that use Terms customProperties from metadata Column. I'm able to retrieve the TermId from list and the TermSet (from the List Field Properties)
But I'm not able to retrieve the TermGroup. How Can I get it or Search directly for the termSet ?
for the moment I use pnp/js like that :
store.local.getOrPut(myKey, () => {
return sp.termStore.groups.getById(termGroupId).sets.getById(termSetId).getAllChildrenAsOrderedTree({ retrieveProperties: true });
}, dateAdd(new Date(), 'minute', 10)).then(cachedTermInfo => {
if (cachedTermInfo?.length > 0)
setTerms(cachedTermInfo);
});
the purpose is to no enter manually the termGroup anywhere.
anyone knows how to do this ?