Questions tagged [iterable]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
2answers
47 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
1answer
23 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 ...
0
votes
1answer
64 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
0answers
163 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
202 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
63 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
46 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
2k 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
802 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
226 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 ]; } ...
6
votes
3answers
14k 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 ...