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
Ravi Kumar 259Ravi Kumar 259 

What is Batchapexworker ?When a Batchapexworker record is created..?

Sagar PareekSagar Pareek
For each 10,000 AsyncApexJob records, Apex creates one additional AsyncApexJob record of type BatchApexWorker for internal use. When querying for all AsyncApexJob records, it is recommend that you filter out records of type

BatchApexWorker using the JobType field. Otherwise, the query will return one more record for every 10,000 AsyncApexJob records.  
ManojjenaManojjena
Hi Ravi ,

Batchapexworker  is not an object in salesforce ,It is an picklist value in AsysncApexJob Object . When ever you will execute an Batch apex in salesforce it will  create two record in AyncApexJob Object with two different JobType (BatchApex/BatchApexWorker) .
The record with jobType BatchApexWorker  will contain the last processed recordid and ParentJobId as the reocrd with Jobtype BatchApex .

I think you are clear now ,Any issue please let me know .

Thanks 
Manoj

 
Ravi Kumar 259Ravi Kumar 259
Thanks Manoj and Sagar