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
vijaymindvijaymind 

Problem with Batch Class when Execute trough Trigger.

System.AsyncException: Database.executeBatch cannot be called from a batch or future method.

 

 

Best Answer chosen by Admin (Salesforce Developers) 
vijaymindvijaymind

I got the solution ...because no more than 5 batch job can execute at the same time . Thats why i was getting that.

All Answers

cloudgofercloudgofer

you can invoke a batch job from a trigger but have to take exterme care !! , are you sure the process context is trigger ? can you elaborate your process of invoking batch , better still if you can post your code. http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_batch.htm

vijaymindvijaymind

I got the solution ...because no more than 5 batch job can execute at the same time . Thats why i was getting that.

This was selected as the best answer