You need to sign in to do that
Don't have an account?
Tom in NY
Default timeout for a JavaScript remoting call
I am trying to change the timeout on a developer account and the timeout is always no more than 10 seconds if I set the value to 8 seconds it times out at 8 seconds, if I set the timeout to 120 seconds it times out at 10 seconds. I tried changing the timeout the following ways:
CurrentInventory.SearchMultipleProducts(partlist, 'JSON', function(result, event){
if (event.status && event.result) {
data = event.result.replace(/("\;)/g,"\"");
console.log("data = " + data);
LoadMultiPartGrid(data);
}
},{timeout: 120000 } );
and I also tried Visualforce.remoting.timeout = 120000; in javascript. Is the developers account limit 10 seconds or am I doing this wrong?
Thanks
Tom
CurrentInventory.SearchMultipleProducts(partlist, 'JSON', function(result, event){
if (event.status && event.result) {
data = event.result.replace(/("\;)/g,"\"");
console.log("data = " + data);
LoadMultiPartGrid(data);
}
},{timeout: 120000 } );
and I also tried Visualforce.remoting.timeout = 120000; in javascript. Is the developers account limit 10 seconds or am I doing this wrong?
Thanks
Tom
You have to use the complete Syntax,
{ buffer: true, escape: true, timeout: 30000 }
https://www.salesforce.com/us/developer/docs/pages/Content/pages_js_remoting.htm
For this reason, we had set the parameter timeout value to other some other value than the default value i.e. 120000 milliseconds as shown below -
{buffer: true, escape: true, timeout: 120000}
The other way to do this will be to set this value at the page level as shown below -
<script type=”text/javascript”>
Visualforce.remoting.timeout = 120000; // Set timeout at page level
</script>
http://www.greytrix.com/blogs/salesforce/transaction-aborted-timeout-error-in-salesforce/
Regards,
Ashish
I ended up putting the timeout in an apex class that is calling the external web service.
So I have:
ExternalWebservice.IInventory Inventory = new ExternalWebservice.IInventory();
Inventory.timeout_x = 120000;