Skip to main content

Questions tagged [batchapexerrorevent]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
34 views

What is the difference between SingleEmailMessage and MassEmailMessage?

While i'm sending Email for 30 records both are getting Limit exceed Exception Through Batch apex i give batch size as 10 but still getting exception.This is my code global class ...
user147601's user avatar
1 vote
1 answer
102 views

Test System.Limit Exception Handling with BatchApexErrorEvent

I want to provoke a System.LimitException in a test method, so I can test BatchApexErrorEvent trigger that is supposed to handle uncatchable exceptions like CPU-Timeout etc. However the LimitException ...
Robert Méndez's user avatar
-4 votes
2 answers
2k views

What is the maximum default scope allowed in batch class and can we change it? [closed]

Can we change default scope?How?.
Guest's user avatar
  • 3
0 votes
1 answer
101 views

Do the BatchApexErrorEvent fields AsyncApexJobId and RequestId differ?

In the BatchApexErrorEvent documentation these two fields are described: AsyncApexJobId - The AsyncApexJob record for the batch Apex job that fired this event. RequestId - The unique ID of the batch ...
Keith C's user avatar
  • 136k
0 votes
1 answer
549 views

Batch showing zero records processed ,is there a way to throw exception if no Records found in Querylocator

here is batch code which is executing currently showing as zero records processed in AysncApexJob , no errors though ,what i want is whenever batch find Zero record in SOQL of start method then batch ...
Fiona Gentry's user avatar
3 votes
0 answers
186 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 |...
cropredy's user avatar
  • 72.1k
1 vote
1 answer
497 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 ...
Sudharsan's user avatar
0 votes
0 answers
38 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 , ...
ASHWIN TIWARI's user avatar
1 vote
1 answer
2k 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 ...
Amit's user avatar
  • 354
1 vote
1 answer
205 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 ...
Siddharth Potawale's user avatar
0 votes
1 answer
527 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 ...
Ravi Kumar's user avatar
2 votes
1 answer
1k 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 ...
sfdcnewbie's user avatar
-2 votes
1 answer
68 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'; ...
Nirmal Christopher's user avatar
0 votes
2 answers
1k 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 ...
SalesforceBits's user avatar
0 votes
1 answer
272 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>(); ...
Rafi's user avatar
  • 1
-1 votes
1 answer
187 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. */...
santhiya durai's user avatar
0 votes
2 answers
1k 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 ...
baby samanwaya's user avatar
0 votes
1 answer
697 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 ...
Simon's user avatar
  • 9
2 votes
1 answer
325 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 ...
Suren's user avatar
  • 43
3 votes
2 answers
419 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. ...
Julien Souchi's user avatar
1 vote
1 answer
730 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: ...
Dinesh Prasad's user avatar
-4 votes
1 answer
892 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. ...
Lokesh's user avatar
  • 66
0 votes
2 answers
314 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){ ...
Sharathchowdary Y's user avatar
4 votes
0 answers
141 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, ...
Tarique Shamim's 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 ...
Tarique Shamim's user avatar