Logo 
Search:

Sharepoint 2010 Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint 2010       RSS Feeds

Problem with Navigation Hierachy

  Asked By: Emiliano    Date: Dec 22    Category: Sharepoint 2010    Views: 7817

Hi everyone!
This is my story:
My process upload docx (programmatically) to my site.
Later, the next process will set metadata values, so then I can filter those documents by navigation hierachy.
If I run the Metadata Values Setter Process one more time, the docx can't be filter by navigation hierachy. But, if I use the Key Filter everythings works fine, even, the navigation hierachy (but just the term who was filter).

Sorry for my English

TaxonomySession session = new TaxonomySession(site);
TaxonomyField tagsField = (TaxonomyField)listItem.Fields.GetField(field);
TermStore termStore = session.TermStores[tagsField.SspId];
TermSet termSet = termStore.GetTermSet(tagsField.TermSetId);
ICollection<Term> termCol = new List<Term>();
Term termResult = GetTermByString(ref termStore, ref termSet, value) //This method finds the correct term by the value parameter
termCol.Add(termResult)
tagsField.SetFieldValue(listItem, termCol);

listItem.SystemUpdate();

Share: 

 

No Answers Found. Be the First, To Post Answer.

 
Didn't find what you were looking for? Find more on Problem with Navigation Hierachy Or get search suggestion and latest updates.




Tagged: