Wednesday, November 18, 2015

Promise to overcome async

promise = new Promise(function(resolve, reject) {
     var ctxr = new SP.ClientContext(siteUrl);
     var oList = ctxr.get_web().get_lists().getByTitle('LISTNAME');
     var camlQuery = new SP.CamlQuery();
     .
     .
     .
     ctxr.executeQueryAsync(onQuerySucceeded, onQueryFailed);
});

No comments:

Post a Comment