Questions tagged [iterable]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
0answers
28 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
1answer
61 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
1answer
47 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
0answers
29 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
1answer
609 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
1answer
428 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
1answer
152 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 ]; } ...
5
votes
3answers
9k 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 ...