Activity Forums Salesforce® Discussions Can a trigger call a batch class in Salesforce?

  • Anjali

    Member
    July 19, 2018 at 2:08 pm

    Hello Avnish,

    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.

  • shariq

    Member
    September 16, 2018 at 1:40 pm

    Hi,

    Yes but it is not the best practice, there are limits in salesforce, so better is to change your logic and try something else.

    Hope this helps.

  • Parul

    Member
    September 16, 2018 at 2:37 pm

    Yes you can call the batch class but salesforce have some governor limits and if you call trigger using batch it hits the limit.

     

     

     

    Thanks

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos