0

How can i show progress bar and refresh page when laoding of data is complete in webservice class.

We have two queable class. First call first webservice then second queable call occur which call second web service. How can i show in prgorss bar and message that first service is done, now second is starting and then finally reload the Case(we have data comming on standard case object).

Thanks

1
  • 2
    Actionpoller component?
    – Eric
    Commented Sep 6, 2016 at 7:07

1 Answer 1

1

When you queue the job after first call, you will get the Job id. Action poller can be used to Poller ApexAsyncJob with the job id you have to check if job has been completed or not. If completed perform your logic.

If you are making the callout from VF page, i would suggest you have a look at Salesforce continuation framework. It has provision of chaining the callouts so you can think its only one callout while in backend its making another callout.

Chain 1 and 2nd callout and the page will rerender after both calls.

References: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_continuation_chained_callouts.htm

https://developer.salesforce.com/blogs/developer-relations/2015/02/apex-continuations-asynchronous-callouts-visualforce-pages.html

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .