Quantcast
Channel: jQuery Library for SharePoint Web Services
Viewing all articles
Browse latest Browse all 6517

New Post: GetListItems only returning rows from the person logged in.

$
0
0
I can't figure out why my GetListItems call won't return all the items in the list. Maybe it's a permissions thing? I have everyone set to Contributor and then a few with Full Control. Here is the SPServices call:
var users = new Array();
var i = 0;
var oldName = "";

$().SPServices({
        operation: "GetListItems",
        async: false,
        listName: listName,
        CAMLViewFields: "<ViewFields><FieldRef Name='StaffName' /></ViewFields>",
        completefunc: function(xData, Status) {
            $(xData.responseXML).SPFilterNode("z:row").each(function() {
                                //if the name is already in the array then don't re-add or move index
                if(oldName != $(this).attr("ows_StaffName"))
                {
                    users[i] = $(this).attr("ows_StaffName");
                    i++;
                }
                oldName = $(this).attr("ows_StaffName");
            });
        }
    });
Can anyone see anything wrong with the above? Is there somewhere I should be checking within SharePoint that may be causing a problem?

Viewing all articles
Browse latest Browse all 6517

Trending Articles