Blogger

  • This email address is being protected from spambots. You need JavaScript enabled to view it.

    Recent items

Login

"The ViewFields property contains a string that corresponds to the inner XML of the ViewFields element in Collaborative Application Markup Language (CAML).

The Type attribute is particularly useful for Lookup and User fields. Otherwise, without that attribute, the query may not return the expected results. In some cases, the query may fail completely."


After two days that I and my collegue This email address is being protected from spambots. You need JavaScript enabled to view it. are having an unexpected error, we found an easy solution after that we've read the previous paragraph.

We are reading our list via a WCF and all fields are displayed except the SPUserField values. We tried to put "SPSecurity.RunWithElevatedPrivileges", the impersonate but nothing else (we think plus a rights problems".

After a lot of test, we say: try to define each fields into the ViewFields property of the SPQuery object and et voilà, it works fine.

So, in the future, I think that I'll use always the ViewFields property to not spent a lot of my time to undestand why SharePoint sometimes give me unexpected problems Risatona but everytime I need to specify all Fields Arrabbiato

 

 

Published in SharePoint