Salam All,
I have a SharePoint Task List with 2 custom fields
- Category :lookup from category list
- OriginalAssignedTo : User picker Allow multi, Users only
When i try to read these 2 fields it keep gives me the below error
"Value Does not fall within the expected Range"
iam getting items using SPQuery without determine the fields and check if the fields exist in the item then check if the field is not null
if(item.Fields.ContainsField("Category"))
if(item["Category"] != null)
item["Category"].ToString(); //----> here i get the error
I have tried the following as well
- read the FormattedValue and check if its null before i read it but the same
- read the field using : item.properties["Category"].ToString();
NOTE: I have another custom field and I am reading it just fine and the returned items have a value for these fields