Questions tagged [promises]

Questions related to promise in terms of asynchronous calls

16 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
4
votes
0answers
307 views

Using JSOM calls with Angular 4

I have to port an AngularJS app to Angular4 which now uses promises and have no clue how I can use this with the executeQueryAsync() method from JSOM. I have also not found any documentation to this ...
2
votes
0answers
75 views

TypeScript and SharePoint Framework question - although works but does it represent correct design?

Thanks for reading my question. I am just beginning to learn TypeScript and from my understanding so far I have created the follow code to retrieve list items from a list. The code works but I am not ...
2
votes
0answers
82 views

Custom Form Rendering RegisterTemplateOverrides in a promise issue

Using custom form rendering with JSLink, I fetch some data in promises before I attempt to do: SPClientTemplates.TemplateManager.RegisterTemplateOverrides(context); However because some of the ...
1
vote
0answers
3k views

Javascript: How to convert [object promise] to a value

I have a list with 2 columns Title and ID. I would like to get the Title based on a unique ID (101) value and insert it into a textbox Test. Here is my code: <script type="text/javascript" src="/...
1
vote
1answer
158 views

Batch operation not following order

I've written a function using pnp-js-core to batch checkout, update and checkin selected items. Problem I'm seeing however is that it seems that by the time the first map is called the next one ...
1
vote
1answer
318 views

SP 2013 How to load PeoplePicker value into promise?

I'm using the SP PeoplePicker posted in this Microsoft article: https://msdn.microsoft.com/en-gb/library/office/jj713593.aspx But how can I load the user ID's into a promise? I'm not familiar with ...
1
vote
0answers
147 views

Call JavaScript Function after list data has successfully updated via quick edit

I am trying to call a custom JavaScript function after content is saved into a list via quick edit. Once the data is saved, I would like to make an AJAX call to get the newly updated items. I do not ...
1
vote
0answers
33 views

Function call in selection event

I want to call the following function in a selection event function name calcDay(). var p = getList("Compulsory Leave"); When i put it inside the selection event function it generated error : p is ...
0
votes
0answers
47 views

Promises resolving out of order

Environment SharePoint 2016 AngularJS 1.5.4 Situation I have a query service that wraps REST calls retrieving data from SharePoint lists. This service works without issue in SP 2013, but it is ...
0
votes
2answers
28 views

How to chain promises for multiple ajax calls to SharePoint to get user ids?

Broken promises, thought I had it figured out, still trying to get reliable results. Console log shows hit and miss results. Below is the rundown of what I'm trying to achieve. Is there a simpler way ...
0
votes
0answers
39 views

Deferred Promise not working inside asynchronous function

I want to sum the amount of multiple rows/entries having the same request ID(common column) for the current User. To achieve this, I am trying to retrieve a list, On successfully retrieved I pick the ...
0
votes
1answer
248 views

CAML QUERY for getting only tasks of current user

I want to show the user only his tasks on specific list, and show him the option to approve and reject from that view. In order to get his tasks I have used the below code: var ...
0
votes
1answer
749 views

Internet Explorer 10 Script7002 XMLHTTPREQUEST network error 0x800c0007, no data is available for the requested resource

I am not sure wha is going on here but I am repeatedly receiving this error when trying to use the REST API when saving a form. I make the $.ajax call, wait for the promise to return but at some ...
0
votes
1answer
723 views

SharePoint framework and typescript promises

I need some help regarding Typescript. I was following a tutorial which pulls search data in client side web part. The code for the service is as follows (it works): const _results:SearchService....
0
votes
2answers
1k views

Populate person field of custom list via REST

How do I get the values of get_id() function into person/group field via REST? I know the syntax of the REST part has to be like: 'AssignedToId': {"results": [ID1, ID2,...]} But how do I load the ...
0
votes
1answer
342 views

SharePoint App Crossdomain Rest function rewritten as a Promise

I have written a successful crossdomain call using Rest which is hosted in an Menu Action App. It returns all document item properties. Ok now I think is the time to rewrite as a JavaScript" Promise....