• Madhu m
  • 0 Points
  • Member since 2018

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
  • 1
Below code is covered as I'm not sure how to fail the batch and move it to else part to do code coverage 

public void finish(Database.BatchableContext bc)

        AsyncApexJob a = [Select Id, Status, NumberofErrors, JobItemsProcessed, TotalJobItems, CreatedBy.Email, ExtendedStatus
                            from AsyncApexJob
                           Where Id =:bc.getJobId()];
         String batchName = 'test_InvalidatingAsmtRequestBatch';                
        If(a.Status=='Completed' && a.NumberofErrors==0){
             Database.executeBatch(new BCSA_BatchExtractSCRAData(),50);                      
             test_Utility bu = new BCSA_Utility();      
             bu.sendEmailNotificationOnBatchJobFail(batchName, a.Status, a.TotalJobItems, a.NumberOfErrors,a.ExtendedStatus);
hi all,

I urgently need to edit/delete a post made by me on this discussion forum...But its not allowing me to do so and pops up
saying that 'you cant delete this question as others are interested in it'.
There are no likes and no comments on it still i am unable  to delete it
Any help would be highly appreciated

Its very urgent,