Questions tagged [batchapexerrorevent]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
-2 votes
0 answers
13 views

Code coverage for Batch Apex help [duplicate]

can anyone help me with code coverage for this batch apex Please ? Thank you In advance global class OppBatch implements Database.Batchable<sObject>, Schedulable , Database.Stateful, Database....
user avatar
3 votes
0 answers
36 views

Batchable: java.lang.IllegalStateException: Phoenix driver closed because server is shutting down

In my full sandbox, I have a batchable that reschedules itself in the finish() method. This job has been running for 2+ years; rescheduling itself many times a day On August 1 at 2231h Pacific, Setup |...
user avatar
  • 63k
1 vote
1 answer
48 views

How to differentiate the batch class based on the different parameters passed and fire different email based on the parameters when batch class fails

I have a batch class which performs certain DML operation in execute method based on certain conditions. Also performing an update under finish method. I have a constructor where parameters of type ...
user avatar
0 votes
0 answers
12 views

How to BULK Archive the Articles? [duplicate]

I am trying to mass archive articles using Batch Class, but when it triggers returns to the ERROR. FATAL_ERROR System.HandledException: You can't perform this action. Be sure the action is valid for ...
user avatar
0 votes
0 answers
36 views

I Have been Getting this Error !! Although the Syntax is Right , Can anyone explain , it says Database method doesnt Exist

Global class BatchClas1 Implements database.Batchable <Sobject> { Global Database.QueryLocator Start (Database.BatchableContext bcontext) { String Searching = 'Select Name , Id , ...
user avatar
1 vote
1 answer
193 views

Batch Apex Uncatchable/uncaught exceptions

I had understanding that if batch apex execute method encounters an uncatchable/uncaught exception, then it stops the batch processing at that particular execution of execute method and does not ...
user avatar
  • 304
1 vote
1 answer
91 views

How to create HTML email template for setup audit trail

I want to implement one functionality where batch class will send the audit trail data in the html body format to the specific recepient. I was trying to create the email template for setup audit ...
user avatar
0 votes
1 answer
120 views

Batch apex state is maintaining but records are not storing in global List from different Batches

In the below batch apex class I'm not able to store different batches or transaction records in the global list, I used database.stateful also still I don't know why?????? Currently I'm getting ...
user avatar
2 votes
1 answer
452 views

Behaviour of Batch Apex jobs when records modified during execution

I was wondering the following scenario - Consider in start method of batch Apex I query all the contacts which are having status = active - Let's assume it will return 50 million records Execute ...
user avatar
-2 votes
1 answer
54 views

Is there any alternate ways to handle string in a better way in the below batch class. I feel it looks ugly? [closed]

global class batchFileUpdate implements Database.Batchable<sObject>{ global Database.QueryLocator start(Database.BatchableContext BC) { string reseller= 'RENEWAL_RESELLER'; ...
user avatar
0 votes
2 answers
577 views

Email Limit Exceeded on Batch Apex

I have a batch job which sends email notification in bulk using Messaging.sendEmail() and its using setTargetObjectId to set the reciepient. It sends out thousands of emails but one day I got case ...
user avatar
0 votes
1 answer
139 views

If account has more than 2 contacts then change email in contact field as default email using batch apex

am new of this salesforce here my code is: Thanks: public class Example1 implements database.Batchable<sObject>{ //Map<id,contact>IdContactMapBatch =New Map<id,contact>(); ...
user avatar
  • 1
-1 votes
1 answer
119 views

create a related list using batch apex

This is the batch class I have created. the execute method is having API call. if I execute this in execute window the related list(order) is not creating. /** * Created by mbianca on 01/04/2020. */...
user avatar
0 votes
2 answers
988 views

How to access dynamic fields from dynamic objects in execute method of batch apex

I am unable get how I can access the dynamic fields from dynamic objects in the execute method. Here start method is returning multiple records with different fields from different object. I want to ...
user avatar
0 votes
1 answer
442 views

how to refer a record type in a apex class [duplicate]

I'm writing a Apex class to auto delete Case records of record type claims and service failure with created date older than 6 Years here is the code. But i'm failing to Refer the record type in the ...
user avatar
  • 9
2 votes
1 answer
206 views

Is there any way to extract more than 50k records inside execute method of batch?

I have a batch working on approx 40k records in chunks of 200 records. Inside execute of the batch I am querying from one abject returning more than 50k records. Getting 500001 error. How to remove ...
user avatar
  • 43
3 votes
2 answers
330 views

Package BatchApexErrorEvent trigger

I'm writing a managed package which uses a batch and i would like to provide errors tracking on this batch. I use a trigger on BatchApexErrorEvent but it doesn't appears in the package creator. ...
user avatar
1 vote
1 answer
350 views

Ending position out of bounds: 10

I am trying to get the first 10 characters from "Patient_Name__c" field into the "Patient_Id_Help__c" field but when i run the batch class it is throwing the error as "Ending position out of bounds: ...
user avatar
-4 votes
1 answer
494 views

BatchApexClass must implement the method: System.Iterator<SObject>?

Why am i getting this error? I'm just converting my csv file and giving it as an input to execute. I think i should not use QueryLocatorIterator at start here but i don't know what to replace. ...
user avatar
  • 56
0 votes
2 answers
252 views

Failing Batch class : First error: List has no rows for assignment to SObject and running batch class with size 1

global class BatchForLatestCaseOHVRDatesAccountField implements Database.Batchable<sObject> { // Start Method global Database.QueryLocator start(Database.BatchableContext BC){ ...
user avatar
4 votes
0 answers
129 views

Getting full stack trace in BatchApexErrorEvent

I am using the BatchApexErrorEvent to get the stack trace of the exception but it only gives the line from where the issue is generated. { ReplayId=12, CreatedDate=2019-06-18 12:45:24, ...
user avatar
2 votes
1 answer
2k views

Not able to execute BatchApexErrorEvent trigger from Batch

I am trying the BatchApexErrorEvent to handle the Batch Exception but the BatchApexErrorEvent trigger is not firing when there is an exception being thrown from a Batch class. TestBatch.cls public ...
user avatar