I am only trying to retrieve the value of the Enterprise Keywords column in my SPList. I do this by:
if(item["TaxKeyword"] != null) Log(item["TaxKeyword"].ToString())
The only way I can find to retrieve the value of the Keywords column is to
item["TaxKeyword"]. Now I have a different way of checking to see if the field exists in the item SPListItem object, which is:
if((TaxonomyField)item.Fields["Enterprise Keywords"] != null))
Which will work and is never null, but when it gets to any instance
item["TaxKeyword"] the code fails with the error message:
Value does not fall within the expected range.
Does this type of column have to be treated different since it is Managed Metadata? How is it possible that the field can exist but when I try to get the value, it doesnt?