Activity Forums Salesforce® Discussions What is the difference between Synchronous and Asynchronous Calls?

  • shradha jain

    Member
    July 30, 2018 at 1:34 pm

    Hello Chanchal,

    Synchronous:

    If an API call is synchronous, it means that code execution will block (or wait) for the API call to return before continuing. This means that until a response is returned by the API, your application will not execute any further, which could be perceived by the user as latency or performance lag in your app. Making an API call synchronously can be beneficial, however, if there if code in your app that will only execute properly once the API response is received.
    Asynchronous:

    Asynchronous calls do not block (or wait) for the API call to return from the server. Execution continues on in your program, and when the call returns from the server, a "callback" function is executed.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos