Questions tagged [iterable]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
6 votes
1 answer

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&...
Piotr Gajek's user avatar
  • 2,555
1 vote
1 answer

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 ...
Tristan Martin's user avatar
0 votes
1 answer

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 ...
sunny roxx's user avatar
0 votes
1 answer

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);...
Hardik Borad's user avatar
0 votes
2 answers

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 ...
Nagendra Singh's user avatar
0 votes
1 answer

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 ...
Niraj Dev's user avatar
2 votes
1 answer

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,...
G Naveen Kumar's user avatar
2 votes
0 answers

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 ...
myrddincat's user avatar
0 votes
1 answer

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 ...
wmin's user avatar
  • 69
1 vote
1 answer

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 ...
Nicholas Savini's user avatar
1 vote
0 answers

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 ...
textual's user avatar
  • 311
0 votes
1 answer

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 ...
Json's user avatar
  • 1,587
2 votes
1 answer

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 ...
Sneha Jagtap's user avatar
2 votes
1 answer

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 ]; } ...
misha_m's user avatar
  • 707
8 votes
2 answers

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 ...
Guru's user avatar
  • 123