I'm having trouble getting the values of a Managed Metadata Field in a SharePoint List.
Basically, what I want to do is given a string (ex. "Category"), it will find all the list items that match that string. The field I am using is Managed Metadata.
What I'm currently doing is getting all List Items then doing the standard:
TaxonomyFieldValueCollection test = item["TaxonomyFieldName"] as TaxonomyFieldValueCollection;
However, I always get "value does not fall within the expected range" error.
Can anyone point out how to do it properly?