I generated two class from apex2wsdl function, but I'm a little confused with async class, method get to parameter System.Continuous object. It is big different between callout method with future annotation and with System.Continuous in param?


The difference is that the Continuation object is meant to be used when you need the response back in the UI, but you don't want to lock up the UI while you're waiting for a response. If you don't need the response back in the UI, you can use a future method instead. As an example of each, the former can be used to show prices for products retrieved from a third-party server, while the latter might be used just to determine the city and state of a record, which would then be updated asynchronously.


@sfdcfox because I cannot comment, does this mean continuation class does not need to be called asynchronously?

  • The Continuation class will be called asynchronously, so there is no need to call it in a future method or other asynchronous code.
    – sfdcfox
    Oct 27 '19 at 7:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.