is live. Lifetime & Yearly plans on offer. thankful for you 🧡

Get the Black Friday deal

Apex articles

Every Apex article on the Salesforce Casts blog: 38 hands-on tutorials and guides, newest first.

Apex

How to debug failures in Platform Events?

Having a robust debugging failures mechanism in platform events in a mandate when working with large amount of data.

Feb 19, 2024 · 2 min read

Apex

Retrying Failed Callouts in Salesforce Apex: Best Practices with Code Snippet

Learn how to retry failed callouts in Salesforce Apex with best practices and code snippet for improved reliability and error handling.

Apr 12, 2023 · 2 min read

Apex

How to create REST API in Apex

Let's look at how to create REST API in Apex. We would need this when we have a bit more customized requirements than performing basic DML on the sObject.

Feb 16, 2023 · 1 min read

Apex

How to fetch records from an object where field 1 = field 2 only using soql?

Have you ever wondered how we can fetch records from an object where field 1 = field 2 only using soql?

Aug 5, 2022 · 1 min read

Apex

Using regular expressions in Apex

Using regex in Apex is one of the most frequently encountered requirements when we work on string manipulation a lot.

Jul 20, 2022 · 1 min read

Apex

How to fetch SObject fields API names in Dev Console without any extension

This feature of being able to fetch Sobject fields API names directly from Developer Console is going to save you tons of time.

Mar 3, 2022 · 1 min read

Apex

Writing the test class for an Extension in Apex

When we need to write test cases for an extension that might be a bit of a learning curve and this post helps you with that.

Feb 17, 2022 · 1 min read

Apex

How to subscribe to a Platform Event using Trigger

Let me walk you through how to subscribe to Platform Events using Triggers.

Apr 24, 2021 · 1 min read

Apex

Can we send SObject as params to Queueable Apex class?

Let's see if we can send SObject as params to Queueable Apex class.

Apr 8, 2021 · 1 min read

Apex

Real-time scenarios on Triggers

Let us look at some Real-time scenarios on Triggers

Apr 7, 2021 · 2 min read

Apex

How to avoid row lock or race condition in Apex

Let me walk you through how to avoid row lock or race condition in Apex.

Apr 1, 2021 · 1 min read

LWC

Continuation Apex in LWC

In this blog post, we will look at how to invoke an Apex method using Continuation.

Mar 18, 2021 · 1 min read

LWC

Wire Apex method to a function using @wire decorator in LWC

Let's look at how to Wire the Apex method to a function using @wire decorator in LWC.

Mar 17, 2021 · 1 min read

LWC

Invoke Apex method using @wire decorator in LWC

This is the first and simple variant when it comes to invoking an Apex method from LWC, which is by using @wire decorator.

Mar 16, 2021 · 1 min read

LWC

Invoke Apex method imperatively in LWC

Let's look at how to invoke apex methods imperatively in LWC

Mar 15, 2021 · 1 min read

Apex

Understanding Batch Apex easily

Lets' try to understand Batch Apex in layman terms.

Mar 13, 2021 · 2 min read

Apex

Process Builder vs Apex Triggers when to use what?

Let's look at one of the most frequently asked Interview Questions. Process Builder vs Apex Triggers when to use what?

Mar 10, 2021 · 1 min read

LWC

Pass a List to the future method in Apex

In this post we are trying to understand how can we send List (or Maps) which are considered as complex data type to future methods.

Mar 9, 2021 · 1 min read

Apex

Advantages and Drawbacks of @future Annotation in Apex

Advantages and Drawbacks of @future. There were some bottlenecks that @future was solving and soon it also started showing its age (drawbacks :p).

Mar 8, 2021 · 1 min read

LWC

Send Arrays from LWC to Apex Methods

Let's look at how to send arrays from LWC to Apex methods.

Feb 23, 2021 · 1 min read

Apex

Apex Interview Question - Sort the alphabets without using any of the native collection methods

Let's look at one of the frequently asked interview questions on Apex.

Feb 8, 2021 · 1 min read

LWC

Pass complex data types from Lightning Web Component to Apex methods

It's pretty much straight forward to send primitive data from LWC to Apex method let's look at sending complex data types in this post.

Jan 31, 2021 · 1 min read

LWC

A few MCQ's on LWC

Here are a few MCQ's on LWC that might be helpful.

Jan 26, 2021 · 1 min read

LWC

Can we import Apex variables from LWC?

Is it possible to import Apex variables from Apex class into LWC? Let's check out.

Jan 20, 2021 · 1 min read

Apex

Delete all debug logs in Salesforce

Delete all debug logs in Salesforce programmatically.

Jan 17, 2021 · 1 min read

Apex

Attach Actions to Asynchronous Apex Jobs Using Transaction Finalizers (Beta) - Spring 21

Let's understand Finalizers in Queueable Apex with the help of a scenario.

Jan 8, 2021 · 1 min read

Apex

Flag Invocable Apex Methods That Make Callouts - Spring '21

How to avoid - You have uncommitted work pending. Please commit or rollback before calling out

Jan 5, 2021 · 1 min read

Apex

Safe Navigation Operator in Apex

Safe Navigation Operator in Apex is going to make our code look not more clean and lean.

Jan 1, 2021 · 2 min read

Apex

Maximum stack depth reached: 1001

Let's understand what causes Maximum stack depth reached: 1001 and how can we avoid it following the best practices.

Feb 7, 2020 · 1 min read

Apex

Mixed DML Operation Error

Let me walk you through when do you encounter Mixed DML Operation Error and how can you fix it.

Feb 6, 2020 · 1 min read

Apex

Apex CPU time limit exceeded

Let me walk you though how can we handle Apex CPU time limit exceeded.

Feb 5, 2020 · 2 min read

Apex

Too many SOQL queries : 101

How can we handle, Too many SOQL queries: 101

Feb 4, 2020 · 1 min read

LWC

Life Cycle Hooks vs Wiring Apex method to a function

When to use Life Cycle Hooks and wire decorator while debugging in LWC.

Jan 31, 2020 · 1 min read

Apex

Sort map to get max value and it's key

Interview Question - Sort map to get max value and it's key

Oct 13, 2019 · 1 min read

Apex

REST API in Batch Apex, errors and maintain state

How to invoke REST API from Batch Apex, common errors and how to maintain state between batches.

Aug 27, 2019 · 2 min read

Apex

What are the Best practices to follow in Batch Apex?

When we use Batch Apex we need to follow a few best practices to write the bulfikied code.

Jul 24, 2019 · 1 min read

Apex

Creating REST API with Apex Programming

How to create REST API using Apex Programming and how to handle the Response Type.

Nov 23, 2018 · 2 min read

Apex

Nice Little Trick To Debug Apex Method Result Set In Javascript - Lightning Framework

The usual route we take when it comes to Debugging Apex methods is using `console.log()` method.

Apr 25, 2018 · 1 min read

Learn it by building it

Every course, every code repository, the discussion group and certificates of completion — one subscription.

Keep me in the loop!

Email me when a new episode is published (promise, I will not spam you)

You're signing up to receive emails from Salesforce Casts