Archive for March, 2011

0x80070057 Invalid data has been used to update the list item. The field you are trying to update may be read only.

March 22, 2011 2 comments

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.