You need to sign in to do that
Don't have an account?
Greg Coogan
Apex Equivalent of Javascript Promises
I am integrating with an external endpoint. The first step is to retrieve a token. When I first developed my solution, I did it all in Apex. However, I ran into an issue where my code would proceed to do a POST (my second step) before the token was recieved. As a result, I switched to using Javascript and its "Promises" on the Visualforce page that is run via custom button. In Apex, how would you replicate the Javascript Promises functionality that waits for a token to be received?
what i coud say is defind the apex code that call from the response by using apex
Also, I could not exactly tell what you mean by "what i coud say is defind the apex code that call from the response by using apex."