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

Apex articles

Page 2 of 9 · 106 articles

3D Salesforce data connector illustrating accurate Last Activity Date tracking for shared activities.Apex

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...

· 4 min read
Designing a Scalable Backend in Salesforce Using Apex Services LayerApex

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...

· 5 min read
A complex 3D circuit board illustrating an Apex trigger test class data flow issue.Apex

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...

· 8 min read
Apex: The Complete Guide to Salesforce's Programming LanguageApex

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,...

· 6 min read
SOQL: The Complete Guide to Salesforce Object Query LanguageApex

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,...

· 6 min read
Apex String Class: 30 Methods Salesforce Developers Use DailyApex

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...

· 5 min read
Types of Apex Triggers in Salesforce: Before, After & 7 Trigger EventsApex

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...

· 5 min read
SOQL CONTAINS vs LIKE vs INCLUDES: Which Operator to UseApex

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...

· 4 min read
SOQL NOT IN and NOT EQUAL (!=): Exclusion Syntax and Null RowsApex

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....

· 6 min read
SOQL ORDER BY: Sort, NULLS FIRST/LAST & Multi-Column ExamplesApex

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...

· 5 min read
3D magnifying glass inspecting a glowing formula on a circuit board, illustrating formula fields in SOQL WHERE clauses.Apex

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...

· 8 min read
A 3D puzzle piece with a lock icon representing PR validation performance and metadata security.Apex

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...

· 4 min read