I was querying a list having many columns, some of them being look-ups. My query was to return a SPListItem based on one ID. Now, when I want to bind the value of look-up field from the SPListItem to a drop-down or text field, I came across an interesting situation.
I used the below code for getting the look-up value:
SPFieldLookupValue fieldLookupValue1 = new SPFieldLookupValue(ListItem["LookupField"].ToString()); if (fieldLookupValue1 != null) Textbox.text = fieldLookupValue1.LookupValue;
The above was working well when logged in as System Account. But it throws an error "Value does not fall within the expected range" when logged in with a user having read access or above. What is interesting is after increasing the value in "List View Lookup Threshold" under Resource throttling for the Web Application in Central Admin this issue got resolved on its own.
Can someone explain what is happening behind? What is the trade-off for increasing the values under Resource throttling?