Sharepoint Forum

 
Home » Forum » Sharepoint       Ask a questionRSS Feeds

Problem with GetListItems()

  Asked By: Lavanya Mulani         Date: Apr 15, 2009      Category: Sharepoint      Views: 254
 

I have a list which has 2 view 1.allItems and Abbreviated View
In allItems which is default view there is grouping been done based on 2
conditions ,whereas in abbreviated view all items in ascending order.
i have one column which has numeric value ,Using that when i am updating the
next item i increment it by one,Problem is if i give name of view as one of
parameter ie abbreviated view ,it does not give me correct data ,If i keep
abbreviated view ad default view and then without passing viewname as parameter
it gives me correct data .Why is that so ?
When passing viewname do we require to pass anything else

XmlNode listXmlNode =
lists.GetListItems(listName,"",null,null,noofRecords,null);

//XmlNode listXmlNode = lists.GetListItems(listName,"Abbreviated
View",null,null,noofRecords,null);

the first line of code works but second does not

Tagged:      

 

1 Answer Found

 
Answer #1       Answered By: Karin Kerr          Answered On: Apr 15, 2009       

You need to pass  the GUID for the view  (including the {}) instead of the view
name.

 
Didn't find what you were looking for? Find more on Problem with GetListItems() Or get search suggestion and latest updates.


Your Answer
  • Answer should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].