2

I can see that there are 50 items on site in list1, but ASMX-service returns me 34 items. When I call GetList("list1") service returns me a description of the list. This description contains an attribute ItemsCount which value equals to a real count of list items (50 in this case).

Here is my code:

XElement ndQuery = new XElement("Query", "");
XElement ndViewFields = new XElement("ViewFields", "");
XElement ndQueryOptions = new XElement("QueryOptions", "");
ndQueryOptions.Add(new XElement("IncludeMandatoryColumns") { Value = "FALSE" });

XElement list = client.GetListItems(
                        "list1",
                        null,
                        ndQuery,
                        ndViewFields,
                        null,
                        ndQueryOptions,
                        null);
  • 1
    If you don't include a query, the web service will query the default view. Does your default view have any filtering on it? – Derek Gusoff Mar 22 '13 at 13:19
  • Derek, post the answer, I'll mark it as correct one. – Alexander Sitnikov Mar 22 '13 at 13:22
4

If you don't include a query, the web service will query the default view. Either change the default view to include all items, or write a caml query that includes all items.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.