I noticed that for a particular list, calling GetListItems and passing null for the viewFields argument, I wasn't getting back all of the columns. Just a few were missing.
After some trial and error, I found that instead of passing null, I could pass in an empty XmlNode like this:
list.GetListItems(
"listname",
null,
query,
(new XmlDocument()).CreateElement("ViewFields"),
null,
null,
null);
And that gives me all the columns.
I don't see why that is the case. I haven't found anything in the documentation to help me understand what's going on. I have used GetListItems many times on many lists but I've never seen it shortchange me on columns with a null viewFields until today.
Why would the GetListItems behave like this?
Thanks!