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
Richie LandinghamRichie Landingham 

50 Apex @Future Limit

Hello,

I am having issues running into this 50 future limit.

Currently, we have a portal that we created inhouse for our clients, and we send a lot of information from our salesforce database to our portal database. 

In this particular instance we are sending multiple objects to our portal, and per client we can get up to 100 of these objects, but obviouslly this is a problem because of the 50 max limit on @future.

If anyone has an example of how they get around this, or what is a effective way of getting this done. Is it possible to make a queue that executes in batches of 10, waits for them to return, and executes the next batch of 10? Or something simillar.
Best Answer chosen by Richie Landingham
Richie LandinghamRichie Landingham
Hey Everyone,

Thought I would give an update on this issue. The only way we managed to get around this is to create bulk calls to the API by sending the array of objects through Json instead of doing a call for each update/creation.

Not a solution you can always uses, since you generally don't have control if the api wasn't build to accept those kinds of calls.

All Answers

Hemant_SoniHemant_Soni
Hi Richie Landingham,

I am not 100% sure but if you have good salesforce developement experience then you can achive this with making of batch of batch Who hold till one bunch of batch executing and after that it will execute other bunch of batch.This is lenghty work that's why i can't help in this at here.
If you need help in this work you can contact me on my email id "soni.sonihemant.hemant@gmail.com" and i will defenatly help you in this work.

thanks
Hemant
 
Richie LandinghamRichie Landingham
Hey Rafael,


I don't believe that increases the limit of issue I am running into.

The error I get is "Too Many Future Calls"
Richie LandinghamRichie Landingham
Hey Everyone,

Thought I would give an update on this issue. The only way we managed to get around this is to create bulk calls to the API by sending the array of objects through Json instead of doing a call for each update/creation.

Not a solution you can always uses, since you generally don't have control if the api wasn't build to accept those kinds of calls.
This was selected as the best answer