Skip to main content
New tool CRON Expression Builder — preview next run times before you schedule Apex. Open the builder →

Apex articles

Page 7 of 9 · 107 articles

A tribute image showcasing the SFDC99 community logo alongside David Liu, honoring his legacy.Apex

Farewell to the SFDC99 Salesforce community and David Liu

David Liu announced he is winding down SFDC99 after a decade of helping admins learn to code. This post looks at the...

· 4 min read
Diagram showing Apex code retrieving a user's IP address and corresponding location data on a map.Apex

Get Apex user IP address and location - SFDC Developers

Ever needed to know where your users are logging in from? Apex can hand you their IP address and map it to city and...

· 4 min read
Boost Your Salesforce Query Performance with @ReadOnly for Large Data | Salesforce @ReadOnly annotation - Salesforce developer tutorialApex

Boost Your Salesforce Query Performance with @ReadOnly for Large Data | Salesforce @ReadOnly annotation

· 4 min read
Diagram illustrating the step-by-step sequence of the Salesforce Order of Execution process for developersApex

Salesforce Order of Execution Guide for Apex Developers

Ever wonder why your record data looks different than expected after a save? It is usually the Salesforce Order of...

· 5 min read
Diagram illustrating the execution sequence of a Salesforce upsert trigger for bulk data loading.Apex

Salesforce Upsert Trigger - How Many Times Does It Fire?

Does an upsert fire both the insert and the update trigger at the same time? It is a common interview question that...

· 4 min read
Diagram comparing the three main patterns for how to call Apex from LWC efficiently in SalesforceApex

3 Ways to Call Apex from LWC - Wire vs Imperative Calls

Fetching data in Salesforce has more than one right answer. Here are the three patterns for calling Apex from LWC, and...

· 4 min read
Visualizing data aggregation using the Salesforce Flow Transform element in a low-code process builderApex

How to Use Salesforce Flow Transform for Data Aggregation

Stop building messy loops just to count records or sum up field values. Here is how to use the Salesforce Flow...

· 4 min read
Diagram illustrating how to fix common Salesforce trigger recursion issues in Apex codeApex

Fix Salesforce Trigger Recursion and Stack Depth Errors

Stack depth errors are a rite of passage for Salesforce developers. Here is why these loops happen and how to use...

· 5 min read
Diagram illustrating the key differences between Salesforce Trigger.new and Trigger.newMap for Apex developersApex

Trigger.new vs Trigger.newMap — Key Differences in Salesforce Apex Triggers

· 4 min read
Diagram explaining the difference between WhoId and WhatId fields for linking Salesforce records in activitiesApex

Guide to WhoId and WhatId in Salesforce Tasks and Events

Polymorphic fields confuse almost everyone at first. Here is what WhoId and WhatId each hold, so your tasks and events...

· 4 min read
Diagram illustrating the execution order of before vs after triggers in Salesforce Apex processing.Apex

Choosing before vs after triggers in Salesforce Apex

Choosing the wrong trigger timing can lead to messy code and governor limit issues. Here is when to use before vs after...

· 5 min read
Diagram illustrating the structure of a well-organized Salesforce Trigger Class handler pattern in Apex.Apex

Salesforce Trigger Class: Why and How to Use Handlers

Putting all your logic inside a trigger is how you end up with technical debt nobody wants to touch. Here is how a...

· 5 min read