-

Batch Class Shortcuts – part 1 : Using Existing Batch Class with Custom Query and Covering Batch Class without Start method Matching Data in test Class
Introduction Salesforce Batch Apex is an essential feature for processing large volumes of data asynchronously. Running a batch job with a custom dataset during development can pose challenges. This is especially true if you want to avoid altering the deployed code. Also, consider a scenario where you’re working in a developer sandbox. The dataset needed…
-

Understanding Database.Stateful in Salesforce Batch Apex
Batch Apex in Salesforce is a powerful tool for processing large amounts of data asynchronously. In this blog post, we’ll explore how to use Database.Stateful to maintain state across the different transactions of a batch job. Specifically, we’ll: Explain the Database.Stateful interface. Demonstrate how to track Database.insert and Database.update successes and failures. Show an example…
-

Using Iterator & Iterable Interface in Apex
In this blog post, we will discuss about the custom iterator, their usage and examples. Custom iterators can be useful in apex. They are majorly beneficial in batch classes because they provide more flexibility in how you iterate over records. By default, batch classes use a QueryLocator to retrieve records from the database. However, there…
-

Using Custom Iterator & Iterable Interface in Apex
In this article, we’ll examine how custom iterators can optimize your data iteration process in Salesforce. We’ll cover the basics of what iterators are and how they work. Furthermore, we’ll explore examples of how you can use custom iterators to streamline your code. What is an Iterator? So what is an iterator, exactly? At its…
-
How to Improve Dynamic SOQL Queries in Salesforce Apex with Database.queryWithBinds() Salesforce Apex Spring ’23 release
If you’re working with Salesforce’s Apex programming language, you may need to write a query to search for specific records in the Salesforce database. In some cases, you may not know the specific values to search for at the time you write the query. In these cases, you can build a dynamic SOQL query…
-
Learning Batch Class in Apex (Salesforce)
A batch class in Salesforce is a class that is used to process large amounts of data in smaller, manageable chunks, also known as batches. This allows for efficient processing of large data sets without exceeding platform limits. They can be used for operations such as data migration, validation, and mass updates. Batch class implement…
