Questions tagged [iterable]
The iterable tag has no usage guidance.
15
questions
6
votes
1
answer
226
views
Unexpected Iterable behavior in Apex
Set implements the Iterable Interface based on the latest Salesforce release (API 58).
I tried to refactor my code to make it simpler and use Iterable<Object> as a supertype for a List<Object&...
1
vote
1
answer
475
views
How to solve "Invalid conversion from runtime type List<ANY> to List<String>"?
I'm working on a library that handles the exposes an iterable batch dynamically. Relevant code:
public abstract class BatchIterable implements Database.Batchable<Object> {
protected abstract ...
0
votes
1
answer
156
views
In Start Method I use Aggregated Query (queries use GROUP By ),then how to check In Execute Method Limit&Number of records we can get using this Query
In Start Method I use Aggregated Query (queries use GROUP By ),then how to check In Execute Method the Aggregate Query how much record Fetch Limit & Number of records we can get using Aggregate ...
0
votes
1
answer
3k
views
I want make test class for batch apex
I want create test class for this batch class and when i execute with this code i got constructor() error.
BatchMessageType myClass = new BatchMessageType();
Id newId = Database.executeBatch(myClass);...
0
votes
2
answers
5k
views
Does Database.QueryLocator and Iterable both have same limit?
I wrote a batch class to insert dummy data into big object and have used Iterable to insert data.
I was under impression that Iterable should only be able to insert in normal limit of 50K records.
But ...
0
votes
1
answer
70
views
Issue with Batch Apex Updating Results from AggregateResults SQOL Query
I have an object Referral__C where we add a NHC_Tracker_ID(Nhc_Tracker__C another object). I want to update the fields on NHC tracker by count Referrals and Unique addresses related to Referral.
My ...
2
votes
1
answer
755
views
ERROR: must implement the method: System.Iterable<SObject> Database.Batchable<>.start(Database.BatchableContext)
global Class Batchsample implements Database.Batchable<Attendance__c>{
global Database.QueryLocator start(Database.BatchableContext BC){
String Query = 'select id,Login_Date_c,...
2
votes
0
answers
753
views
How can I work with both QueryLocator and List<SObject> in a single batch class (not a single instance)?
I've been working on a chainable batch class. The constructor can take in either a service & query or a service & list of records. In almost all cases, the service/query are passed in. In ...
0
votes
1
answer
703
views
Aggregate Query on 900K records - how to do this?
Hello fellow developers,
I need to run an aggregate query on 900K telephone records to add up a field (grouping by phone line id) and record results in the "summaries logbook".
I have tried ...
1
vote
1
answer
357
views
Trouble with Custom Iterable in Batch Apex
I'm having some trouble implementing a Custom Iterable in Batch Apex. The goal is to update Accounts and Opportunties when information on the Owner's User Record has changed. Everything seemed correct ...
1
vote
0
answers
128
views
how to check iterator in batch process
I am using an iterator to use an aggregate query on a custom object looking for unique years. on the very last iteration, I want to change a value, so I am hoping to use hasNext, but it looks like i ...
0
votes
1
answer
3k
views
Iterator and Iterable issue - must implement the method: System.Iterable<SObject> Database.Batchable<SObject>.start(Database.BatchableContext)
Unlike OP in this question, I am using a custom iterator and I'm getting the same error as stated in the title.
This is my first attempt of writing a custom iterator and I'm having troubles compiling ...
2
votes
1
answer
1k
views
Unable to insert records using Iterable Batch class
I'm trying to create an Iterable Batch class for inserting records. I'm able to insert my records in my normal class. I have created the Batch class and am trying to call it my current class in the ...
2
votes
1
answer
310
views
Why I can't use Iterable<Id> in SOQL?
Just interesting behaviour.
I want to write method:
public User[] getUsersByIds(Iterable<Id> userIds) {
return [
SELECT Id
FROM User
WHERE Id in :userIds
];
}
...
8
votes
2
answers
22k
views
What is the Iterable interface used for in Batch Apex?
I have start learning "Batch Apex" and have read much material about it. But I am unsure of the use of Iterable in batch apex. I have seen many confusing examples too.
I read this in the ...