Appendices

Syntax cheat sheet, keywords, governor limits (per transaction unless noted), key system classes reference, release & version history, learning resources and suggested study plan (12 weeks).

Appendices

44.1 Syntax cheat sheet Common Apex keywords: abstract after before break catch class continue delete do else enum extends false final finally for global if implements inherited insert instanceof interface merge new null override private protected public return sharing static super switch testmethod this throw transient trigger true try undelete update upsert virtual void webservice when while with without.

Reserved words that cannot be used as identifiers include (partial list): array bulk by case char collect commit const convertcurrency default desc end exit export float from goto group having import inner into join like limit list long loop map nulls number object of on or outer package parallel pragma retrieve returning rollback savepoint search select set short sort stat synchronized system then today tolabel transaction type using where yesterday.

Annotations: @isTest @testSetup @TestVisible @future @AuraEnabled @InvocableMethod @InvocableVariable @RestResource @HttpGet @HttpPost @HttpPut @HttpPatch @HttpDelete @ReadOnly @RemoteAction @Deprecated @SuppressWarnings @JsonAccess @NamespaceAccessible.

44.3 Governor limits (per transaction unless noted) SOQL rows retrieved Database.getQueryLocator rows 50 million (Batch start) SOSL queries / rows Callouts / cumulative timeout Max request/response size for callouts @future invocations 0 in future/batch; 50 in Queueable Messaging.sendEmail calls EventBus.publish (immediate) Stack depth (recursive triggers) Batch scope size default 200, max 2,000 Concurrent batch jobs (active/queued) 5 (+100 in flex queue) Scheduled Apex jobs Async Apex executions max(250,000, licenses × 200) per 24 h Apex code size

6 MB per org (excl. tests & managed packages) Debug log size

Limits change occasionally; verify in the *Execution Governors and Limits* page of the Apex Developer Guide.

44.4 Key system classes reference Class / namespace debug, now, today, enqueueJob, schedule, runAs, abortJob DML/query with options

insert, query, queryWithBinds, executeBatch, setSavepoint, getCursor

getGlobalDescribe, describeSObjects, SObjectType.Account.fields

getQueries, getCpuTime, getHeapSize startTest, stopTest, setMock, createStub, getEventBus areEqual, isTrue, fail Security / AccessLevel stripInaccessible, USER_MODE

getUserId, getProfileId, getTimeZone, isMultiCurrencyOrganization JSON, JSONGenerator, JSONParser

serialize, deserialize, createGenerator Http, HttpRequest, HttpResponse send, setEndpoint, getBody

RestContext, RestRequest, RestResponse request.requestURI, response.statusCode publish, TriggerContext Email & notifications

sendEmail, SingleEmailMessage, CustomNotification Crypto, EncodingUtil Encryption, hashing, encoding

generateDigest, base64Encode, urlEncode String, Math, Date, Datetime, Decimal format, setScale, addDays Pattern, Matcher compile, matches forName, newInstance createInterview, start Chatter, Experience Cloud, Einstein ChatterFeeds, EinsteinLLM Auth, Site, Network Identity & Experience Cloud

Auth.RegistrationHandler, Site.getBaseUrl Deploy metadata from Apex Run DataWeave scripts 44.5 Release & version history

Salesforce ships three releases a year (Spring, Summer, Winter — Winter is named for the following year). Each release increments the API version by 1.

Notable Apex items switch statement LWC GA; CDC GA Security.stripInaccessible GA Safe navigation operator ?. Transaction Finalizers GA

Assert class, Database.queryWithBinds, External Credentials User mode database operations GA

Comparator, Queueable delay & AsyncOptions Null coalescing ??, UUID Apex Cursors (beta) Agentforce era begins Agentforce action improvements Continued Agentforce/Apex updates

Current-generation tooling (Code Analyzer v5) Release-specific feature lists are summaries; consult each release's official notes for exact GA status.

44.6 Learning resources Official (free):

Trailhead (trailhead.salesforce.com) — modules *Apex Basics & Database*, *Apex Triggers*, *Apex Testing*, *Asynchronous Apex*, *Apex Integration Services*, *Apex Specialist* superbadge, *Lightning Web Components Basics*, *Platform Developer I/II* trails

*Apex Developer Guide* and *Apex Reference Guide* (developer.salesforce.com/docs)

*Salesforce DX Developer Guide*, *Salesforce CLI Command Reference*

Salesforce Developers blog and YouTube channel; release notes (three times a year)

Sample apps: Apex Recipes, LWC Recipes, Dreamhouse, Ebikes (github.com/trailheadapps)

*Salesforce Lightning Platform Enterprise Architecture* — Andrew Fawcett

*Advanced Apex Programming in Salesforce* — Dan Appleman *Mastering Apex Programming* — Paul Battisson

Community: Salesforce Stack Exchange, Trailblazer Community groups, r/salesforce, SFXD Discord, Apex Hours, Salesforce Ben, community open-source projects (fflib, Nebula Logger, Trigger Actions Framework, ApexMocks)

Certifications: Platform Developer I, Platform Developer II, JavaScript Developer I, Agentforce Specialist, Application/System Architect paths 44.7 Suggested study plan (12 weeks)

Platform, orgs, tooling, first class and Anonymous Apex Data types, collections, operators, control flow

Strings/dates/math, exceptions — Part I exercises OOP: classes, sharing, inheritance, interfaces SOQL, SOSL, DML, Database methods

Triggers, frameworks, order of execution, governor limits — Project 1 Testing — Part II exercises, Project 2

Async Apex, platform events, CDC — Project 3 Mocking, callouts, Apex REST/SOAP — Project 4

Security, LWC, Aura/Visualforce, Flow & invocable — Project 6

Metadata, email, patterns, DI, debugging, modern features — Part III exercises, Project 5

DX, deployment, packaging, Agentforce, best practices — Project 7 or 8 🎓 Final Words

You've gone from a one-line System.debug to bulk-safe trigger frameworks, asynchronous pipelines, secure integrations, enterprise architecture, and AI agent actions. The heart of great Apex is respect for the platform: think in bulk, live within governor limits, enforce security, and prove your code with meaningful tests. Keep building in a Developer Edition org, finish the Trailhead superbadges, read the release notes every season, and ship the capstone projects. Happy coding, Trailblazer! ☁️

// Class & members
public with sharing class MyClass extends Base implements IFoo {
    public static final Integer MAX = 10;
    public String name { get; private set; }
    public MyClass(String n) { name = n; }
    public override void run() { }
}

// Collections
List<String> l = new List<String>{ 'a' };   Set<Id> s = new Set<Id>();
Map<Id, Account> m = new Map<Id, Account>([SELECT Id, Name FROM Account]);

// SOQL / SOSL
List<Contact> cs = [SELECT Id, Account.Name FROM Contact WHERE AccountId IN :ids WITH USER_MODE LIMIT 200];
List<List<SObject>> found = [FIND 'Acme*' IN NAME FIELDS RETURNING Account(Id, Name)];

// DML
insert as user records;   Database.SaveResult[] r = Database.update(records, false);
Savepoint sp = Database.setSavepoint();   Database.rollback(sp);

// Trigger
trigger T on Account (before insert, after update) { new AccountTriggerHandler().run(); }

// Async
System.enqueueJob(new MyQueueable());   Database.executeBatch(new MyBatch(), 200);
System.schedule('Job', '0 0 2 * * ?', new MySchedulable());   EventBus.publish(new My_Event__e());

// Callout
HttpRequest req = new HttpRequest(); req.setEndpoint('callout:My_NC/path'); req.setMethod('GET');
HttpResponse r
…