Salesforce PDI Tests Apex and Lightning Development Judgment — Not Just Syntax
The exam tests whether you can build secure, scalable Salesforce solutions using Apex, SOQL, and Lightning — and when to use declarative tools instead.
Check Your Readiness →Most candidates understand Salesforce Platform Developer I concepts — and still fail. This exam tests how you apply knowledge under pressure.
PDI tests development on the Salesforce platform. The most critical concept is governor limits — every design decision must account for bulk processing, SOQL query limits, and DML operation limits. One SOQL query in a loop is the most common exam trap.
Query the related record inside the trigger loop for each Account
Collect all Account IDs from Trigger.new, query all related records in one SOQL query outside the loop, store in a Map, then process all records — one SOQL query, not N queries for N records
Make the callout directly in the test and test against the live response
Implement a mock using HttpCalloutMock interface — Salesforce prevents callouts in test context unless a mock is defined
Check the user's profile in Apex and restrict access programmatically
Use Salesforce permissions (Custom Permissions, Permission Sets) to restrict Apex class execution — platform-level security is the correct approach; profile checking in code is fragile
SOQL queries inside loops hit governor limits (100 SOQL queries per transaction). Always collect record IDs in a list, query once outside the loop, and process results in a map. This is the single most tested Salesforce development anti-pattern.
Triggers must handle bulk operations — Salesforce processes up to 200 records per trigger invocation. Triggers that assume one record (using Trigger.new[0] only) fail when multiple records are processed.
CRUD/FLS must be done explicitly using DescribeFieldResult and DescribeSObjectResult. Candidates who assume Apex respects CRUD/FLS automatically fail security enforcement questions.
Salesforce requires 75% code coverage, but coverage without assertions is meaningless. System.assertEquals() must verify expected behavior — not just execute code.
with sharing enforces the running user's sharing rules (secure). without sharing bypasses sharing rules (system context). Choosing without sharing when sharing enforcement is required is a security defect.
Salesforce PDI tests development judgment under governor limits. Test whether your Apex knowledge is production-ready.