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

New Post: Converting permissions request to Promises

$
0
0
I have a nice application that returns some good information about permissions on a list. In trying to convert it to the Promises version, it fails in a way I don't understand.
    $(document).ready(function() {

        var listPromise = $().SPServices({
         operation: "GetPermissionCollection",
         objectName: '{0322FE3F-D1F3-40D1-BFCD-AAC2DB369D7E}',
         objectType: "List"     //only two values: List, Web
        });
        listPromise.done(function() {
alert("done...");
        }); //listPromise.done
        listPromise.fail(function() {
            alert("Error getting permissions collection...");
        });

    }); // $(document).ready
The code fails at the .done() clause, not finding an object (presumably, listPromise). The alert does not display.

See anything wrong?

Viewing all articles
Browse latest Browse all 6517

Trending Articles