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
krish4ukrish4u 

how to know the apex class name based on batch job id in batch apex

 Hi Folks,

 

How to get the Apex class name of the batch job id in batch apex. can any one suggest me. this is very urgent..............pleaseeeee......................

 

thanks

krish

Santosh KumbarSantosh Kumbar

Krish4u,

 

You can get apex class Id from AsyncApexJob:

 from below query : a.ApexClassID

 

AsyncApexJob a = [SELECT Id, Status, ApexClassID,NumberOfErrors, JobItemsProcessed,
      TotalJobItems, CreatedBy.Email
      FROM AsyncApexJob WHERE Id =
      :BC.getJobId()];

Regards

Santosh