Programmatically set a TaxonomyField on a list item
Posted
by Mel Gerats
on Stack Overflow
See other posts from Stack Overflow
or by Mel Gerats
Published on 2010-04-30T15:43:21Z
Indexed on
2010/04/30
15:47 UTC
Read the original article
Hit count: 868
sharepoint2010
|sharepoint
The situation:
I have a bunch of Terms in the Term Store and a list that uses them.
A lot of the terms have not been used yet, and are not available yet in the TaxonomyHiddenList. If they are not there yet they don't have an ID, and I can not add them to a list item.
There is a method GetWSSIdOfTerm
on Microsoft.SharePoint.Taxonomy.TaxonomyField
that's supposed to return the ID of a term for a specific site.
This gives back IDs if the term has already been used and is present in the TaxonomyHiddenList, but if it's not then 0 is returned.
Is there any way to programmatically add terms to the TaxonomyHiddenList or force it happening?
© Stack Overflow or respective owner