Quantcast
Channel: { Name: "Mazin" }
Viewing all articles
Browse latest Browse all 25

Exception from HRESULT: 0x80131904 Caused by missing LookupID="True"

$
0
0
I was running the following query when I unexpectedly got this cryptic error: Exception from HRESULT: 0x80131904.


 
   
     
       
        11
     
   
 
  1


PersonFieldName person/group field cannot be compared directly to the integer value 11. This somehow caused the error message which certainly does not indicate anything related to the actual mistake that I have made. One must indicate that we want to compare the Id of PersonFieldName in the FieldRef element, to the integer value in the Value element. We do that simply by adding the attribute LookupId and set its value to "TRUE" as follows:



Why didn't someone just throw new InvalidOperationException("Cannot compare field of type Person/Group to integer value.");

What's more interesting is that this very same error message seems to appear when other kinds of problems occur. Looks like some part of SharePoint's code is missing proper exception handling. See this blog post about receiving the same error message for memory capacity problems!

Viewing all articles
Browse latest Browse all 25

Trending Articles