Website Loading ....

Disadvantages of future class

1 min read

We already discussed complete details about the future class. If you want to directly look into this post check the below 2 posts to understand.

Future class Basics and limitations: Click Here

Where / When to use Future Class: Click Here

Below are the disadvantages of using Future class :

  1. We cannot monitor the Jobs.
  2. we cannot call a future from another future or batch apex.
  3. The limit on future methods for single apex invocation is 50.
  4. The future method supports only primitive datatypes
  5. Salesforce’s Future class is not able to roll back.
  6. The Future class allows you to run code asynchronously in a separate thread, which can be useful for long-running or resource-intensive operations. However, because the Future class runs in a separate thread, it cannot be rolled back by the platform’s transaction management system.

To overcome from above disadvantages salesforce came up with Queueable apex.

 

Sruvi IT

Sruvi IT Solutions

Expert in digital transformation, SEO, and enterprise technology. Helping businesses grow through innovative IT solutions since 2018.