Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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);
share|improve this question
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
    
Thank you Derek, it's the way! –  Alexander Sitnikov Mar 22 '13 at 13:20
    
Derek, post the answer, I'll mark it as correct one. –  Alexander Sitnikov Mar 22 '13 at 13:22
    
done, and thanks! –  Derek Gusoff Mar 22 '13 at 15:16

1 Answer 1

up vote 4 down vote accepted

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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