开发者

How to get all list items regardless of view using Lists webservice

I have a list with only one view exposed on it (default view). That only view 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,
                                listConfig.DestViewGuid,
                                query,
  开发者_如何学编程                              viewFields,
                                RowLimit,
                                queryOptions,
                                null);


Answered here @ http://www.sharepoint.stackexchange.com/questions/10118/how-to-get-all-list-items-regardless-of-view-using-lists-webservice

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜