0×80070057 Invalid data has been used to update the list item. The field you are trying to update may be read only.
I came across this strange error today when I was trying to (programmatically) update a lookup column in a SharePoint list.
Below is the declaration for the lookup column in the schema.xml of the list:
<Field ID="{25b21cbb-c154-4dda-ac58-506a5853e5de}" Name="mlClientID"
StaticName="mlClientID" Type="Lookup" DisplayName="Company" List="Lists/mcompany" FieldRef="ID" ShowField="Title" Group="Custom Columns" />
When I removed FieldRef=”ID” and then re-created the list it solved the problem.
I am not really sure why or what is going on in the background that causes this issue but I hope this helps someone incase you have the same problem.
Categories: MOSS 2007, SharePoint, SharePoint 2010
ASP.net, C#, lookup, sharepoint, sp2010, splist
Thanks, you saved me a big headache.