How to identify the Future Calls limits using Apex Class?

We can get the Future Call limits using Defug log like below:

Number of SOQL queries: 10 out of 100 ******* CLOSE TO LIMIT
Number of query rows: 1200 out of 50000
Number of SOSL queries: 0 out of 20
Number of DML statements: 20 out of 150
Number of DML rows: 25 out of 10000
Number of script statements: 2500 out of 200000
Maximum heap size: 0 out of 6000000
Number of callouts: 0 out of 10
Number of Email Invocations: 0 out of 10
Number of fields describes: 0 out of 100
Number of record type describes: 0 out of 100
Number of child relationships describes: 0 out of 100
Number of picklist describes: 0 out of 100
Number of future calls: 11 out of 10 ******* CLOSE TO LIMIT

So using Apex Class we can identify the Future Calls counts:

using the following methods we can identify the future Calls limits


Returns the number of methods with the



Returns the total number of methods with the


How to avoid to receving the “Too Many Future Calls” during the Test Classes?

using the following combination of Apex Method, we can avoid to receiving the “Too many future calls” during Tests:

Sample Code:

 if(Test.isRunningTest() && Limits.getFutureCalls() >= Limits.getLimitFutureCalls()) {
     system.debug(LoggingLevel.Error, '@Future Calls method reached limits so, please skip the process...........');
 } else {

Written by 

I am Sakthivel Madesh, a certified Salesforce Advanced Developer & Administrator working on Salesforce Technology since 2011. I am currently working in Techforce Services as Sr. Salesforce Developer. I have worked on multiple technologies Like PHP, Java, Salesforce, I am very passionate about Salesforce and to earn 15x Salesforce Certification. I love Trailhead for learning Salesforce Skill and Become a Trailhead 5x Ranger too. I Love to Learn & Share my Salesforce knowledge to Salesforce Learners/Beginner using My Blog and Salesforce Community.

Leave a Reply

Your email address will not be published. Required fields are marked *