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

New Post: GetUserCollectionFromGroup not working on my WSS sites.

$
0
0
I am trying to write a function that returns all the members of a given group. My code seems to work just fine when I am looking at groups created in MOSS sites, but I can't seem to get it to work on my WSS sites. Anything I need to know? Can someone please point me in the right direction?
function GetGroupMembers(strWeb, strGrpName){

    $("#myOutDiv").html("<table id='tblGroupMembers' class='ms-vb'><tr><th>ID</th><th>Name</th><th>UserID</th></tr></table>");
    
                  $().SPServices({
                    operation: "GetUserCollectionFromGroup",
                    async: false,
                    webURL: strWeb,
                    groupName: strGrpName,
                    debug: true,
                    completefunc: function (xData, Status) {
                                    //var i=0;
                                        if (Status == "success"){
                                            $(xData.responseXML).SPFilterNode("User").each(function() {
                                                $("#tblGroupMembers tr:last").after("<tr><td>" + $(this).attr("ID") + "</td><td>" + $(this).attr("Name") + "</td><td>" + $(this).attr("LoginName") + "</td></tr>");
                                            });

                                        }
                    }
                    
                  });

    return true;    
}

Viewing all articles
Browse latest Browse all 6517

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>