Sharepoint 2010 Forum

 
Home » Forum » Sharepoint 2010       Ask a questionRSS Feeds

Problem with Navigation Hierachy

  Asked By: Emiliano Lsp         Date: Dec 22, 2010      Category: Sharepoint 2010      Views: 2843
 

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();


Do you know someone who can help? Share a link to this thread on twitter, or facebook.

Tagged:        

 

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.


Your Answer
  • Answer should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].