Skip to main content Back CRM Cloud Mastery Sign up Create account

Advanced Apex: Async, Bulk & Performance

Async Apex, bulk design and performance at volume — the code that works on ten records and dies on ten million.

  • Advanced
  • 56 lessons
  • 10 modules
  • English

Designed and created by Salesforce Expert

What you'll learn

  • Account for what a transaction costs, and design inside that budget
  • Write trigger and bulk patterns that hold at production volume
  • Choose the right asynchronous tool — future, queueable, batch or scheduled
  • Keep SOQL selective against large data volumes
  • Publish and consume platform events, and integrate in both directions
  • Measure performance end to end instead of guessing at it

Course content

10 sections · 56 lectures · 17 hands-on labs

The night the rating run did not finish 2 lectures
  1. 1.1 The Night The Rating Run Did Not Finish
  2. 1.2 What Advanced Apex Is For, And What This Exam Actually Tests
The transaction, and what it costs 5 lectures
  1. 2.1 The Transaction Is The Unit, And There Are Two Sets Of Limits
  2. 2.2 CPU Time, Heap, And The Costs A Query Count Never Shows You
  3. 2.3H Hands-On: Measure A Real Transaction, And Let Your Own Org Report Its Ceilings Hands-on
  4. 2.4 Reuse That Helps: The Service Layer, The Selector, And Three Places Reuse Is The Wrong Answer
  5. 2.5H Hands-On: Take A Slow Class Apart And Make It Fast Without Changing What It Returns Hands-on
Bulk and trigger design at scale 5 lectures
  1. 3.1 Past The Handler Pattern: One Entry Point, Many Rules, And The Second Developer
  2. 3.2 Cascades And Re-Entrancy: When Your Save Fires Somebody Else's
  3. 3.3H Hands-On: Rebuild Wrenmoor's Usage Trigger So An Entire Night Survives It Hands-on
  4. 3.4 Declarative And Programmatic In The Same Save: Ordering, Contention, And Who Keeps The Rule
  5. 3.5H Hands-On: Make A Flow And A Trigger Disagree On Purpose, Then Decide Which One To Delete Hands-on
Transactional integrity, and failing at volume 5 lectures
  1. 4.1 What A Rollback Actually Undoes, And The Evidence It Destroys On The Way Out
  2. 4.2 Savepoints In Anger: What They Are For, What They Cost, And The Rule Almost Everybody Breaks
  3. 4.3 Partial Success: The Database Methods, The Result Objects, And Reading A Failure You Were Given
  4. 4.4H Hands-On: Make Half A File Land On Purpose, And Record Why The Other Half Did Not Hands-on
  5. 4.5 Idempotency And Retry: Designing A Nightly Job That Is Safe To Run Twice
Asynchronous Apex, properly 10 lectures
  1. 5.1 What Asynchronous Actually Buys You, And The Four Things It Costs
  2. 5.2 The Future Method: Its Rules, Its Ceiling, And Why It Is Rarely The Answer Now
  3. 5.3 Queueable: Carrying State, Chaining The Next Job, And What Depth Means
  4. 5.4H Hands-On: Convert A Future Method To A Queueable, Then Chain The Rest Behind It Hands-on
  5. 5.5 Batch Apex: Start, Execute And Finish, And The Query Locator That Makes The Whole Thing Possible
  6. 5.6H Hands-On: Batch Wrenmoor's Rating Run, And Watch The Scope Size Change Everything Hands-on
  7. 5.7 Schedulable, And The Difference Between A Schedule And A Queue
  8. 5.8 Finalizers, Retries, And What Happens When An Asynchronous Job Dies Where Nobody Is Watching
  9. 5.9aH Hands-On: Five Requirements, Five Different Answers Hands-on
  10. 5.9bH Hands-On: Prove Which One Ran, And Close Section Five Hands-on
Advanced SOQL, selectivity and large data volumes 9 lectures
  1. 6.1 The Advanced Keywords, One At A Time, And What Each Of Them Is Actually Protecting You From
  2. 6.2 Aggregate Queries: Grouping, Rolling Up, And The Result That Is Not A List Of Records
  3. 6.3H Hands-On: Rewrite Four Of Wrenmoor's Queries With The Keyword That Was Missing From Each Hands-on
  4. 6.4 Selectivity: What Makes A Filter Selective, And The Four Things An Index Cannot Help You With
  5. 6.5H Hands-On: Read A Query Plan, Then Turn A Query That Scans Everything Into One That Does Not Hands-on
  6. 6.6 Large Data Volumes: The Guide's Own Definition, And What Actually Changes On The Day You Cross It
  7. 6.7 The Four Tools You Ask For: A Custom Index, A Skinny Table, Deferred Sharing, And An Archive
  8. 6.8aH Hands-On: Walk An Object You Cannot Hold Hands-on
  9. 6.8bH Hands-On: The Paging That Looks Right And Is Not Hands-on
Dynamic Apex 5 lectures
  1. 7.1 Describe: Asking The Org What It Looks Like Instead Of Compiling Your Assumptions Into The Class
  2. 7.2 Dynamic Queries, Dynamic Saves, And The Generic Record That Could Be Anything
  3. 7.3H Hands-On: One Class Wrenmoor Writes Once And Points At Any Object It Likes Hands-on
  4. 7.4a The Injection You Write By Accident, And The Three Things That Close It
  5. 7.4b The Half That Is Not Injection At All
Platform events: publish and subscribe 5 lectures
  1. 8.1 One Fact, Six Listeners, Nobody Coupled
  2. 8.2 The Publish That Survives A Rollback
  3. 8.3 Three Ways To Listen, And One Way To Catch Up
  4. 8.4H Hands-On: Publish The Outage Feed, Then Listen To It Three Ways Hands-on
  5. 8.5 What Events Do Not Promise You
Integration: inbound and outbound 7 lectures
  1. 9.1 Who Calls Whom, And Who Is Allowed To Wait
  2. 9.2 Inbound: What You Owe A Caller You Cannot See
  3. 9.3H Hands-On: Expose Wrenmoor's Porting Status, And Break It On Purpose Hands-on
  4. 9.4 Outbound: The Call You Make, And The Transaction You Must Not Hold Open
  5. 9.5 Asynchronous Callouts, And The Argument The Guide Asks You To Make
  6. 9.6H Hands-On: Call The Carrier From A Queueable, Then Test It With No Network At All Hands-on
  7. 9.7 When The Answer Is Not Apex At All
Performance end to end, and the exam 3 lectures
  1. 10.1 A Performance Investigation From The Top
  2. 10.2 The Exam Run
  3. 10.3 The Code You Now Own At Wrenmoor

Requirements

  • BLD-110 Apex Foundations, or solid working Apex experience
  • A free Developer Edition org

Description

This course opens on the night a rating run did not finish, and everything after it is about why. It is the Apex course for code that has to survive volume: what a transaction actually costs, trigger design at scale, transactional integrity when things fail halfway, asynchronous Apex done properly, selective SOQL against large data volumes, dynamic Apex, platform events, and integration in both directions.

It assumes you can already write Apex. What it adds is the judgement to look at a working class and see where it will fall over in eighteen months, and the techniques to measure that rather than guess.

Who this course is for

  • Working Salesforce developers whose code now runs against real volume.

Skills you'll practise

Asynchronous ApexBatch ApexPlatform eventsLarge data volumesSelective SOQLPerformance tuningDynamic Apex

Related reading