Asynchronous Calls with the Salesforce Console Integration Toolkit
The Salesforce Console Integration Toolkit lets you
issue asynchronous calls. Asynchronous calls allow the client-side process to continue instead
of waiting for a callback from the server. To issue an asynchronous call, you must include an
additional parameter with the API call, which is referred to as a callback function. Once the
result is ready, the server invokes the callback method with the result.
Asynchronous
syntax:
method('arg1','arg2', ..., callback_method);
For
example:
//Open a new primary tab with the Salesforce home page in it
sforce.console.openPrimaryTab(null, 'https://salesforce.com',
false, 'Salesforce', callback);