SharePoint 2010: Unable to index into an object of type Microsoft.SharePoint.SPListItem

While trying to add an item to a SharePoint List, i had the following error message:

Unable to index into an object of type Microsoft.SharePoint.SPListItem.
 + $newItem[ <<<< "column_name"] = $SPFieldUserValue
 + CategoryInfo : InvalidOperation: (column_name:String) [], RuntimeException
 + FullyQualifiedErrorId : CannotIndex

Column name are case sensitive, and i had forgotten a caps !

 

Leave a Comment