• #29614
    Salesforce | suniti suniti #294
    Forcetalks

    When a BatchApexworker record is created in batch apex in salesforce?

    When a BatchApexworker record is created in batch apex in salesforce?

     

    #31044
     Anjali #7
    Forcetalks

    Hi suniti,

    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.

    #34245
    Salesforce | Parul Parul #2
    Forcetalks

    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 .

     

    Thanks

    #34394
    Salesforce | shariq shariq #1
    Forcetalks

    Hi,

    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.

    #34725
    Forcetalks

    Hello suniti,

    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.

Viewing 5 posts - 1 through 5 (of 5 total)

Please to reply to this topic.

CONTACT US

We're not around right now. But you can send us an email and we'll get back to you, asap.

Sending

About Us

Forcetalks is a Salesforce collaboration platform for coders & developers, geeks & nerds, consultants & business heads, admins & architects, managers & marketers and of course the business owners. A community where you can learn from, where you can contribute to. For you. For Salesforce. Read More...

Copyright 2019 Forcetalks. All Right Reserved.

Log in with your credentials

or    

Forgot your details?