SharePoint Developer Center >
SharePoint Products and Technologies Forums
>
SharePoint - Development and Programming
>
sharepoint web services
sharepoint web services
- Hello,
I have a custom list called Reports with columns projectsid,startdate,enddate,status,mgrname and priority. Then I created custom standard view called Myprojectview and made MyProjectView as an default view.I am using GetListItems method to fetch data from Reports list.
XmlNode ndListItems = spListsWS.GetListItems("Reports", String.Empty, ndQuery, ndViewFields, "5000", ndQueryOptions, string.Empty);
In this process I am missing few columns and data.How to fetch all columns with data from ALL Items view.
Thanks in Advance
Answers
- Make sure all the column is added in Myprojectview view which you are expecting to be return by function. & Pass the your View Name when you call the function GetListItems().
Ashwin B. | My Blog | Twitter- Marked As Answer byAaron Han - MSFTModeratorWednesday, November 11, 2009 2:18 AM
- Hi Sathish,To get all records use All Items SPView.Syntax -Refer - http://msdn.microsoft.com/en-us/library/lists.lists.getlistitems.aspx
public XmlNode GetListItems ( string listName, string viewName, XmlNode query, XmlNode viewFields, string rowLimit, XmlNode queryOptions, string webID )
Regards, Avinash | avinashkt.blogspot.com- Marked As Answer byAaron Han - MSFTModeratorWednesday, November 11, 2009 2:18 AM
- Make sure to pass in the "All Items" view name and make sure the view fields node is null.
XmlNode ndListItems = spListsWS.GetListItems("Reports", "All Items", ndQuery, null, "5000", ndQueryOptions, string.Empty);
certdev.com- Marked As Answer byAaron Han - MSFTModeratorWednesday, November 11, 2009 2:18 AM
All Replies
- Hi Sathish,To get all records use All Items SPView.Syntax -Refer - http://msdn.microsoft.com/en-us/library/lists.lists.getlistitems.aspx
public XmlNode GetListItems ( string listName, string viewName, XmlNode query, XmlNode viewFields, string rowLimit, XmlNode queryOptions, string webID )
Regards, Avinash | avinashkt.blogspot.com- Marked As Answer byAaron Han - MSFTModeratorWednesday, November 11, 2009 2:18 AM
- Make sure to pass in the "All Items" view name and make sure the view fields node is null.
XmlNode ndListItems = spListsWS.GetListItems("Reports", "All Items", ndQuery, null, "5000", ndQueryOptions, string.Empty);
certdev.com- Marked As Answer byAaron Han - MSFTModeratorWednesday, November 11, 2009 2:18 AM
- Make sure all the column is added in Myprojectview view which you are expecting to be return by function. & Pass the your View Name when you call the function GetListItems().
Ashwin B. | My Blog | Twitter- Marked As Answer byAaron Han - MSFTModeratorWednesday, November 11, 2009 2:18 AM
- Thanks for ur response..


