Classes implementing the `batchable` interface are used when there is a need to operate on a large number of data records which would normally be problematic due to the imposed governor limits.

learn more… | top users | synonyms (1)

3
votes
1answer
30 views

Downloading file from FTP with batch

I need to develop a batch which will download a CSV file from a FTP and insert data in Salesforce.com every day. Is it possible to do that with Apex or an AppExchange please? I search but no useful ...
0
votes
0answers
7 views

Stop batch process and automatically jump to finish() function

Good day everyone, I have created a batch process and inside the execute function, there is a condition. If a condition is meet, I want to stop the batch process and then call another batch process. ...
1
vote
2answers
25 views

N>Help [Stop Batch.Execute and Jump to Batch.Finish if Condition in Execute is Met]

I have a batch class which we use to save data from csv to different objects. In the batch.execute, I put a condition to check if a data to be inserted meets the data type of the field its going to ...
2
votes
1answer
32 views

Internal Salesforce.com Error in a Query inside a Batch

Problem i'm having an issue in a Batch Process. It's have been working properly since January, but in the last days i'm getting an Internal SalesForce Error. The error line is inside a Query which is ...
3
votes
0answers
34 views

Error: UNABLE_TO_LOCK_ROW, unable to obtain exclusive access to this record [duplicate]

I have a batch job running asynchronously and I believe I am getting this error when the record run by batch job is being updated by a user at the same time. I am getting above error in test class and ...
8
votes
3answers
112 views

GetContentAsPDF from Batch Apex and Trigger fails with new Update

[Salesforce Update] The critical update named “PageReference getContent() and getContentAsPDF() Methods Treated as Callouts” was scheduled for auto-activation in Winter ’16. To allow for ...
0
votes
1answer
16 views

What does status='Failed' in where condition in a AsyncApexJob query returns?

Can someone explain as to what is returned when I'm querying AsyncApexJob object with status set in where condition as 'Failed'?
0
votes
1answer
47 views

Calling batch from finish of same batch job

Trying to implement Dan Appleman solution to call batch job from finish method of another batch job. Bu the execute method is continously looping. Can someone suggest me on ways to improve my batch ...
0
votes
1answer
52 views

failure/success counts in batch apex

I have a batch class where the requirement is to get the actual count of success and failure records then send an email to different email ids one for failure and the other for success with the record ...
1
vote
1answer
17 views

Bulk Data Insertion that includes relationships

Good day everyone, I just want to ask your idea in regards with my problem. I am trying to read a data from csv and upload the data to salesforce. Below is an image of sample data in my csv. This is ...
2
votes
1answer
29 views

Testing the ACTUAL batchable context in Database.Batchable methods?

I'm trying to mock Database.BatchableContext to make my unit tests more robust and to eliminate excess usage of Test.isRunningTest() running in production code. Few hacks are available like ...
1
vote
0answers
40 views

How to find duplicate leads for given set of leads?

Here is my requirement and I am confused on how to solve this. So please help me. Requirement: We have set of leads, the count could be any where from 50 to 1000 leads. Client wants to know for each ...
1
vote
0answers
35 views

Queueable interface to chain Apex batch jobs

Can we use the Apex Queueable interface to chain batch jobs? I am planning to invoke a Apex Queueable interface from the finish method of a batch job. The Queueable interface would queue the Apex ...
4
votes
1answer
78 views

Number of callouts allowed from batch execute method showing zero?

I have the below sample code: global class BatchApexExample implements Database.Batchable<SObject>{ public Database.QueryLocator start(Database.BatchableContext bc){ ...
1
vote
1answer
16 views

How can I make assertions and avoid multiple executions when I test batachable Apex code?

I know that you can test batchable Apex code by calling the Database.executeBatch() function. For example: Database.executeBatch( batchable_instance ); However, I have inconsistent results with any ...
0
votes
1answer
49 views

How to make more than 100 callouts per transaction?

I am new to Salesforce callouts and batch concepts but here is the requirement that I am working on: Requirement is to get data from a third party API and create lead objects in our salesforce and ...
2
votes
1answer
25 views

Rollback complete batch process

I want to roll back a complete batch related transaction if there is any exception while processing anywhere during batch execution I can roll back that specific transaction, but not sure if I can ...
0
votes
1answer
38 views

Batch Apex - System.CalloutException: You have uncommitted work pending. Please commit or rollback before calling out

I am getting System.CalloutException: You have uncommitted work pending. Please commit or rollback before calling out. global class BatchClassName implements ...
0
votes
2answers
40 views

how to get acknowledgement after Apex Batch process complete

I am run a batch class from a normal class using Database.executeBatch method, steps below the batch execute methods are executing before the Batch process is completed. Does there is any way to ...
1
vote
0answers
8 views

Unable to Commit Batch Uploads (No Error Script)

Has anyone else had any issues with committing batch uploads into records? There is no error message and the status remains in "processing for upwards of 24hrs". The records I am trying to process ...
0
votes
1answer
25 views

explain salesforce FlexQueue limit?

related to: https://developer.salesforce.com/releases/release/Spring15/FlexQueue and https://help.salesforce.com/apex/HTViewHelpDoc?id=code_apex_flex_queue.htm&language=en_US In both linked ...
0
votes
2answers
36 views

How to call a future method from a batch class? [duplicate]

How can I solve this problem? Can you please give me an example or an idea for a potential solution?
12
votes
1answer
176 views

Detect if Apex Flex Queue is enabled in an Org

I have a managed package that starts a batch job. Right now, before attempting to start the batch it does a check like: integer batchJobLimit = 5; integer currentBatchCount = [SELECT count() ...
1
vote
1answer
33 views

Sandbox refresh creating inaccessible scheduled batch job

I have a batch job that reschedules itself on completion so that it can essentially run indefinitely. Within its finish method it calls system.scheduleBatch to start itself again after a defined ...
1
vote
2answers
121 views

How many records can an APEX batch is capable of processing

I am trying to find the total number of records (volume) an APEX batch is capable of processing overall. Can someone please help me in this. Need to know the volume not limit Question # 69265 on ...
1
vote
1answer
45 views

Apex batch execute method not being called

I have the below batch code global class BatchClassAccountSched implements Database.Batchable<SObject>, Database.AllowsCallouts, Schedulable { global Database.Querylocator ...
1
vote
3answers
130 views

check the status of apex class

I have a vf page on which there is only one command button which on click calls "ExecuteBatch" method. method os given below :: public void executeBatch() { ACPBoxInvoiceDataBatch batch = ...
3
votes
1answer
39 views

Stop Batch Process

Good day everyone, I have created a batch process. Let say I have thousands of records to process. Now what i want is when there is an error encounter or some problem found in the data during the ...
3
votes
1answer
57 views

Batch Error : First error: Unable to write to any of the cursor

First error: Unable to write to any of the cursor stores in the allotted time (15000 msecs): took 15004 msecs for 24751 bytes, 0/3 succ/fail calls, first fail: 598) Getting the above error ...
2
votes
1answer
29 views

Create custom error message for batch process

Good day everyone, At the moment, I've created a batch process wherein its purpose is to parse csv file and save the parse data to salesforce object. During the batch process I have to check the data ...
1
vote
1answer
65 views

Get Data from batch iterable

Good day everyone, Maybe this question is basic for everyone but I'm having a problem with it, so I'm asking for help. I have created a BATCH ITERABLE . global with sharing class batchProcessor ...
2
votes
0answers
34 views

Get first row of CSV data in salesforce and use for mapping

I want to get data from csv and upload it to salesforce. I use this link http://www.blueengine.com.au/?p=40#comment-271 and ...
0
votes
1answer
19 views

How to write the Batch Apex using Last Modified By (Account object) in salesforce?

Here iam using Account object had the field of Last Modified By.how to write the Batch Apex can you please give me the example of above scenario.
0
votes
1answer
61 views

how to update all child record in the system using parent field value using batch apex?

I am trying to update all RelatedInventory__c(Child) in the System using the Opportunity(parent) field value from a custom button on the opportunity page, Suppose I enter an amount 500 and save it ...
-3
votes
1answer
47 views

How to call a @future method from Batch Apex? [duplicate]

Can anyone please give me an example or an idea on how to solve this problem?
2
votes
2answers
129 views

How I can create 1000 account with batch apex?

How to use batch apex to create 1000 account and 10 opportunities per account..
2
votes
2answers
110 views

Count of records processed during batch

I have a batch apex in which I am trying to insert 1000 records at a time. I am using Database.insert() to insert the records.For this is there any way to get the count of records that has been ...
-2
votes
3answers
42 views

is it possible to run the batch apex without using the start method in salesforce?

without using the start method to run the batch Apex. how to solve the above scenario please give some ideas.
0
votes
0answers
32 views

how to write scheduled apex in salesforce?

global class MySchedulableClass implements Schedulable { global void execute(SchedulableContext ctx) { CronTrigger ct = [SELECT Id, CronExpression, TimesTriggered, NextFireTime FROM CronTrigger ...
-1
votes
2answers
13 views

How to Run Apex Scheduler 6days of job schedule? [closed]

please give me one example of above scenario.how to run the schedule apex job in developer console.please give some ideas.
-1
votes
2answers
285 views

How to run apex scheduler job class via developer console?

global class Scheduler01 implements Schedulable { global void execute(SchedulableContext SC) { //Call other class method which will perform operations as it is ...
0
votes
4answers
78 views

how to execute the apex schedular job in developer console?

please give me the example program of apex schedular job.How to run the developer console that code give one example. please Give some ideas.
0
votes
2answers
73 views

How to run the Apex Scheduler in salesforce? [closed]

please give me the one example of batchapex schedular program.how to run the schedule jobs in salesforce .please give one example of that above scenario.give some ideas.
1
vote
1answer
29 views

insert related records while adding bulk records using batch apex

I am trying to import CSV file into salesforce which has almost 200 records. I need help while inserting related data in loop as i don't want to use insert query in loop. So generally to bulk insert ...
0
votes
2answers
55 views

Batch Apex for Counting number of Contacts associated with Account

I am developing one Batch apex which will count number of Contacts associated with Account object.It will store the count in a field "No_of_Contacts" on Account. I am confuse in how can i write SOQL ...
-4
votes
1answer
40 views

Batch Apex Class Information

In our Sandbox Organization Apex Classes are written in year 2011. Please find below images and Apex Classes information and let me know about what is exactly they do in our organization with apex ...
1
vote
1answer
51 views

AsyncApexJob entry of type BatchApexWorker

I have batch apex that gets scheduled using system.schedulebatch call. What i see is when job is scheduled I see 2 entries on AsyncApexJob object. 1 record is of JobType BatchApex, 2nd record is of ...
1
vote
0answers
28 views

Batch Apex job not able to complete

I have a batch apex job that runs multiple times thru a day and night. Once it finishes, I am scheduling same job but after x mins. This job is not doing any heavy lifting. It is querying around 500 ...
0
votes
0answers
14 views

Submit or Abort Batch Apex using SOAP API

Is there a way to submit or abort batch apex job using SOAP API ? I don't see any SOAP API calls for this purpose but want to make sure. If there is no SOAP API call, can executeAnonymous() soap API ...
2
votes
3answers
225 views

delete records from multiple objects via apex batch class

I have a requirement for a process that would delete qualified records from multiple objects. There are about 5 objects and criteria for deletion is the same for all objects. I want to do all of it in ...