Forum Discussion
Vipin Tyagi
Aug 24, 2016Brass Contributor
Synchronous programming behavior with JSOM in SharePoint Online ?
Hello, This is my first post @network.office.com.Hope this is not gonna ignored. I'm just trying to get some value and append it to a list when everytime when a asyncronous call of code. Exa...
Deleted
Aug 24, 2016It's pretty hard to understand what you are trying to achieve.
What it looks like you are doing is executing the call to SharePoint three times and then iterating over the result three times. That's a bit weird as the call wil retreive the same results.
clientContext.load(camlItems);
for (var i = 0; i < 3; i++) {
var a = '#';
clientContext.executeQueryAsync(
function () {
success(camlItems);
},
error
);
}
- Vipin TyagiAug 26, 2016Brass Contributor
I want a function call back behaviour (like deferred and promises).
I have my values just before Async function.
I want to concatenate each value every time with SharePoint list data when I get a value.
- DeletedAug 26, 2016
This blogpost has a great example and explanation on using promises with JSOM.
http://blog.qumsieh.ca/2013/10/31/using-jquery-promises-deferreds-with-sharepoint-2013-jsom/