Managed Metadata update terms via timer jobs

You need to have patience when you update a term in a termstore programmatically.

TaxonomySession taxonomySession = new TaxonomySession(properties.OpenSite());
TermStore mainTermStore = taxonomySession.TermStores[0];
Term ParentTerm = mainTermStore.GetTerm(ParentTermId);
TermCollection childTerms = ParentTerm.GetTerms(oldTerm, intLCID, true, StringMatchOption.ExactMatch, 1, true);
Term modifyTerm = childTerms[0];
modifyTerm.Name = newTerm;

The term itself will be updated immediately but not for the already assigned terms. The timerjob "Enterprise Metadata site data update" will do this. Have some patience, refresh your screen et voilà 🙂
This entry was posted in Sharepoint. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s