Activity Forums Salesforce® Discussions What problems you have encountered when calling Salesforce batch apex from a trigger?

  • Anurag

    Member
    July 20, 2018 at 1:02 pm

    Hii Anjali,

    There is not a specific problem encountered while calling a batch from a trigger. But there are few limitations that we should keep in mind which calling the batch class. For instance, we can only have 5 batch jobs queued or executing at once. So we should be aware of the potential limits. If our trigger calls batch jobs each time, then we could quickly exceed that limit.

  • chanchal kumar

    Member
    July 20, 2018 at 1:20 pm

    hi anjali,

    You can call a batch from a trigger, but you need to be aware of potential limits you could hit.

    You can only have 5 batch jobs queued or executing at once. If your trigger calls batch jobs each time, then you could quickly exceed that limit.

  • Parul

    Member
    September 23, 2018 at 8:46 am

    future method call that performs more processing on the same record(s). The issue is that this entire process becomes recursive in nature and you receive the error "System.AsyncException: Future method cannot be called from a future method.

  • Avnish Yadav

    Member
    September 30, 2018 at 5:31 am

    Hello,

    You can call a batch from a trigger, but you need to be aware of potential limits you could hit. You can only have 5 batch jobs queued or executing at once. If your trigger calls batch jobs each time, then you could quickly exceed that limit.

    Thanks.

Log In to reply.

Popular Salesforce Blogs