function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
BinayakBinayak 

To make more than 10 web - callouts in same context

I have a requirement to search data immediately  from around 16 salesforce orgs. Since connecting and getting data from a single org needs  two callouts, i easily hit the callout limit. Could anyone suggest me a work-around..

@future wont help as I need the result immediately

sfdcfoxsfdcfox

Workarounds depend on attempted method of operation. Triggers have a hard limit, but you can bypass this through multiple namespaces.

 

Create three or four namespaces (different managed package orgs), and have them each query three or four orgs. When all are installed in the same org, they each operate in their own namespace govenor limits, and so won't hit the limit.

 

In Visualforce, you can script the callouts one after another using JS Remoting, Batch Apex, or just cleverly chaining together action/javascript methods.

BinayakBinayak

Thanks for a quick reply.Can you be more elaborative.(I am using REST calls to retrieve the data from the orgs).

KMForceKMForce
Hi Binayak,
       You can make more than 10 callouts by this approach:
http://techstuffdiary.wordpress.com/2014/02/28/no-callout-limit-and-doing-dmls-before-callout/