0
votes

Using CSOM to get data from SharePoint. After adding new fields to a list I get the "Value does not fall within expected range" error when trying to retrieve items from a list. I use the Include statement to include fields

Example

icon => icol.Include(
i => i["Field1"],
i => i["Field2"],
i => i["SomeNewField"])

When I add the SomeNewField I get the error. Thought it was about null values but even when I add a record where SomeNewField has a value the error occurs.

Any ideas

1

1 Answers

0
votes

You need to add the new field into the caml query XML.
Error: enter image description here Success: enter image description here