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

How to launch a document by clicking a link to the file?

Word: <a href='ms-word:ofe|u|path/to/web/word/document.docx'>Link to document</a> Excel: <a href='ms-excel:o...