Managed Metadata update terms via timer jobs


Hi
 
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;
mainTermStore.CommitAll();

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à 🙂
 
Advertisements
This entry was posted in Sharepoint. Bookmark the permalink.

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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