I have a list with only one view exposed on it (default view). That list has a filter with a field Assigned To = [Me] so all users logged in can only see their own list items. This list items get copied from a master list.

I have this code to get the list items from the list with only one view but it only returns the items assigned to myself (as expected). Is there anyway to get all list items in a list regardless of the view?

  var xmlDoc = new XmlDocument();
  XmlNode query = xmlDoc.CreateNode(XmlNodeType.Element, "Query", "");
  XmlNode viewFields = xmlDoc.CreateNode(XmlNodeType.Element, "ViewFields", "");
  XmlNode queryOptions = xmlDoc.CreateNode(XmlNodeType.Element, "QueryOptions", "");
  queryOptions.InnerXml = "<MeetingInstanceID>-1</MeetingInstanceID><ViewAttributes Scope='RecursiveAll' />";
  return destLists.GetListItems(listConfig.DestGuid,

1 Answer 1


Your second node is the viewName, defined as:

A string that contains the GUID for the view surrounded by curly braces ({}), which determines the view to use for the default view attributes represented by the query, viewFields, and rowLimit parameters. If this parameter contains an empty string, the default view is used. If the view GUID is supplied, the value of the query, viewFields, or rowLimit parameter overrides the equivalent setting within the view. For example, if the view specified by the viewFields parameter has a row limit of 100 rows but the rowLimit parameter contains 1000, then 1,000 rows are returned in the response.

Source: MSDN - Lists.GetListItems Method

Since you're passing empty strings for query, viewFields, and rowLimit, you're getting the default view, exactly as defined in the list.

To override the Assigned To = [Me], you'll have to write the query to have different parameters. The referenced page gives examples of how to write the query XML.

  • @Jim, thanks, threw a custom query in the query node and got all the items :) Mar 10, 2011 at 22:46
  • Excellent!!!! Glad to have helped! Apr 1, 2011 at 13:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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