If you are implementing business logic through Salesforce's flow, you might need to loop through a list of records to do some manipulation. This is a very basic requirement. If you ever need to query records from Salesforce (let's say all accounts where the...
use case
Implementing Decorator Design Pattern in Apex
This post is part of the series - Design Pattern in ApexI am sure as a developer, we all faced some situations where we need to have some kind of temporary fields just for calculation or displaying in the UI, but we don't want to store that information in the...
Implementing Strategy Design Pattern in Apex
This post is part of the series - Design Pattern in ApexThe strategy design pattern is the one which allows an algorithm's behavior to be chosen at run time. It is used to define a set of algorithms to solve a common problem. It allows unique logic per algorithm...
Implementing Singleton Design Pattern in Apex – Use Case III
This post is part of the series - Design Pattern in ApexToday in this post I will explain how Singleton Design Pattern can be used to call global describe only once.Requirement -When someone inserts an account record, you need to inspect all the fields in...
Implementing Singleton Design Pattern in Apex – Use Case II
This post is part of the series - Design Pattern in ApexToday in this post I will explain how Singleton Design Pattern can be used to stop calling the same trigger twice.Consider the situation - You as a developer, is updating a field in Trigger which in turns calls a...
Implementing Singleton Design Pattern in Apex – Use Case I
This post is part of the series - Design Pattern in ApexSingleton Design Pattern is pretty popular and one of the simplest design pattern available. I will start with the statement from “The Gang of Four” as it describes Singleton Pattern as –“Ensure a...
