Apex articles
Page 2 of 9 · 106 articles
Fix Salesforce Last Activity Date for Shared Activities
With Shared Activities on, Last Activity Date only moves for the primary contact on a Task or Event, so every secondary...
Designing a Scalable Backend in Salesforce Using Apex Services Layer
As Salesforce applications grow more complex, the backend logic written in Apex gets hard to manage, test and scale. A...
Apex Trigger Not Updating: Test Class Field Value
Your trigger looks like it is ignoring the field values your test class sets. Usually it is stale in-memory data, a...
Apex: The Complete Guide to Salesforce's Programming Language
Apex is Salesforce's strongly-typed, server-side language. This pillar covers data types, triggers, async patterns,...
SOQL: The Complete Guide to Salesforce Object Query Language
SOQL is the SQL-flavored query language Salesforce ships for reading data. This pillar page covers every operator,...
Apex String Class: 30 Methods Salesforce Developers Use Daily
Every Apex String method that matters in real code: split, join, contains, trim, escape, format, and the ones that...
Types of Apex Triggers in Salesforce: Before, After & 7 Trigger Events
Apex triggers come in two timing variants (before and after) and seven event types. Knowing which to use prevents...
SOQL CONTAINS vs LIKE vs INCLUDES: Which Operator to Use
SOQL has no CONTAINS keyword. Use LIKE '%text%' on text fields, INCLUDES on multi-select picklists, and SOSL for long...
SOQL NOT IN and NOT EQUAL (!=): Exclusion Syntax and Null Rows
SOQL excludes records three ways: NOT IN for lists and subqueries, != for one value, and (NOT field LIKE) for patterns....
SOQL ORDER BY: Sort, NULLS FIRST/LAST & Multi-Column Examples
Every SOQL ORDER BY pattern in one place, from ASC/DESC and multi-column priority to NULLS FIRST vs NULLS LAST, sorting...
Formula Field in SOQL WHERE Clause: Best Practices
Filtering a SOQL WHERE clause on a formula field works, but the value is calculated per record and can never be...
PR Validation 10x Slower: Solving Permission Set Bottlenecks
Why the metadata engine slows down when Permission Set changes ride along with Apex classes in a Salesforce CI/CD...