- July 3, 2018 at 12:51 pm #29614suniti #294
When a BatchApexworker record is created in batch apex in salesforce?
When a BatchApexworker record is created in batch apex in salesforce?August 6, 2018 at 5:47 am #31044Anjali #7
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.September 15, 2018 at 5:06 am #34245Parul #2
BatchApexworker 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 .
ThanksSeptember 15, 2018 at 5:36 pm #34394shariq #1
To add more –
BatchApexworker used internally by Salesforce. For each ‘AsyncApexJob’ record of type ‘BatchApex’, Apex creates for internal use an ‘AsyncApexJob’ record of type ‘BatchApexWorker’ per 10,000 records to be processed. When querying for all ‘AsyncApexJob’ records, we recommend that you filter out records of type ‘BatchApexWorker’ using the ‘JobType’ field to avoid returning more than one record for each ‘AsyncApexJob’ record of type ‘BatchApex.’
Hope this helps.September 17, 2018 at 10:02 am #34725shradha jain #14
Each time batch Apex is invoked, it creates an AsyncApexJob record. You can use the ID of this record to construct a SOQL query to retrieve the job’s status and progress. Apex creates one additional AsyncApexJob record of type BatchApexWorker for internal use for every 10,000 AsyncApexJob records.
Please Register to reply to this topic. /