You need to sign in to do that
Don't have an account?
Yishay Haspel 10
we suddenly receive a System.CalloutException: Callout loop not allowed.
Hi all,
we suddenly receive a System.CalloutException: Callout loop not allowed.
We read about this exception and it has no meaning in our case.
1. We get it from a method that callout to an external service we need.
Http http = new Http();
HttpResponse res = http.send(request);
2. It works when we call the method synced manner.
3. When on the other hand the method is called from a future that on turn was called from a trigger we get the exception.
4. It didn't happen at the beginning of week.
5. It doesn't happen in our dev org.
Anyone got something like this and overcome it?
Thanks,
Yishay
we suddenly receive a System.CalloutException: Callout loop not allowed.
We read about this exception and it has no meaning in our case.
1. We get it from a method that callout to an external service we need.
Http http = new Http();
HttpResponse res = http.send(request);
2. It works when we call the method synced manner.
3. When on the other hand the method is called from a future that on turn was called from a trigger we get the exception.
4. It didn't happen at the beginning of week.
5. It doesn't happen in our dev org.
Anyone got something like this and overcome it?
Thanks,
Yishay
Hi,
i think when trigger is fired. it is calling your external webservice method in a loop.
You might have placed the call inside the loop that iterate over trigger context varibales.
Let me know if this helps
Regards
Abhilash Mishra
1) http://salesforce.stackexchange.com/questions/6142/callout-loop-not-allowed-error
2) https://help.salesforce.com/apex/HTViewSolution?id=000232321&language=en_US
3) http://help.salesforce.com/HTViewSolution?id=000181795
Let us knwo uf this will help you
Abhilash Mishra, Thanks you for your reply. This exception is not about loops, but is caused when you callout to another org which in turn callout.
Amit Chaudhary, Thanks you for your reply. We callout to an external service which is not salesforce, I most mention that:
1. It works when the procedure doing the callout is called when the user request it and fails from future.
2. It works in our dev org and fails in a customer org.
3. It worked in the cutomer org in the beginning ot the week,
Many thanks,
Yishay
In the @future method i retrieve all my data and call pageReference.getContent(); seems to solve it.