This project has moved and is read-only. For the latest updates, please go here.

Get List items, fields names, column names dynamically

Apr 15, 2015 at 9:25 AM
Hi All,
I am building a custom mobile UI for sharepoint 2010 site using spservices.
It works very good, I'm getting all lists name and user information. I build a menu that holds all the lists names and url, when the user is clicking on a list url, the page is refreshing with each list items.

The problem I have is I dont want to write all fields name manually in spservices since there are so many list on the site. I would love to know how to code spservices so it pull all column names based on the default view and all items from that list with out adding fields names manually.
$j('#cd-sp-lists li a').click(function(){
    var ListGUID = $j(this).attr('title');  

            operation: "GetListItems",
            async: false,
            listName: '' + ListGUID + '',               
            CAMLViewFields: "<ViewFields><FieldRef Name='TeamProfilePhoto' /></ViewFields>",
            completefunc: function (xData, Status) {
              $j(xData.responseXML).SPFilterNode("z:row").each(function() {

                var liHtml = "<li>" + $j(this).attr("ows_TeamProfilePhoto") + "</li>";      

        return false;           
It would be awesome if someone has done it before and can show me how. I'll really appreciated.
Apr 15, 2015 at 2:18 PM
Not fully, but take a look at GetListItemsSinceToken or SPGetListItemsJson.

Apr 20, 2015 at 10:44 AM
Can you please show me an example?
Apr 29, 2015 at 1:59 PM
Did you look at the two functions I mention above? There are examples in the docs.