CertifyDeck
All cheat sheets
Platform Developer · CHEAT SHEET

Salesforce Certified Platform Developer

Key concepts grouped by official exam weight.

Download as PDF (free, no sign-up)

1. Developer Fundamentals

27–27%

Developer Fundamentals

  • Apex is saved, compiled and executed on a metadata-driven multitenant platform, so the runtime enforces governor limits shared by all code in one execution context. Visualforce follows MVC: the page is the view, the standard or Apex controller supplies the logic, and the database is the model. Lightning Web Components is preferred for new UI; it renders on the client and works alongside Aura components.
  • Use declarative tools before code: formula fields to calculate values from a record or its parent, roll-up summary fields to count, sum, or find the minimum or maximum of detail records in a master-detail relationship, validation rules to reject invalid data, and Flow Builder for automation. Apex triggers are for logic that is complex, performance-critical, or CPU-intensive, and they must be bulkified.
  • Use a lookup when objects are only sometimes related and master-detail when the detail depends on the master (cascade delete and access control; the field goes on the detail); a junction object with two master-detail fields creates a many-to-many relationship. In Apex and SOQL, custom names end in __c and relationships in __r; upsert matches on Id or on an External ID field.
  • Agentforce Vibes extension (formerly Agentforce for Developers) works in Salesforce DX projects with telemetry enabled: its chat generates and explains Apex, LWC and tests, and with the Salesforce DX MCP server it uses real org context; it also autocompletes code in Apex and LWC files. Rules always apply and Skills only when they match, and output is nondeterministic: always review it.

2. Process Automation and Logic

28–28%

Process Automation and Logic

  • Flow Builder is the tool for no-code automation: screen flows collect user input, autolaunched flows are called from another flow, Apex or the REST API, and record-, schedule- and platform event-triggered flows run in the background. In record-triggered flows, Fast Field Updates change the triggering record before it is saved, while Actions and Related Records, asynchronous paths and scheduled paths act afterwards.
  • In Apex every variable starts as null and the language is case-insensitive. Static methods are called on the class name, private methods only from their own class, and global opens access across namespaces. An interface declares signatures without bodies that each class implements (Schedulable requires execute()); static variables last only one execution context, and Database.Stateful keeps instance variables across batches.
  • In Apex, an if, else if chain runs only the first true branch and each else binds to the nearest if; switch on runs the matching when block. while checks its condition before each pass, do-while runs its block at least once, and for repeats a set number of times or walks a collection. A SOQL for loop with a list iterates in batches of 200, and DML or SOQL inside a loop exhausts governor limits.
  • SOQL reads records of one object with an exact match, supports subqueries by relationship name (Contacts, __r) and dot notation to the parent; SOSL searches words across objects and returns a list of lists in RETURNING order. DML statements are all-or-nothing; Database.insert(list, false) allows partial success with SaveResult, and upsert matches on the Id, an idLookup field or an external ID.
  • Use one trigger per object that delegates to handler class methods, and always design it for collections: loop over Trigger.new and run SOQL and DML outside loops. Before triggers change fields without DML; after triggers read system values such as the Id and treat their records as read-only. Pick the right context variables (oldMap in update and delete) and use addError() to block the save.

3. User Interface

25–25%

User Interface

  • In Apex, with sharing applies the user's sharing rules and user mode (WITH USER_MODE, as user, AccessLevel.USER_MODE) respects their object and field permissions. On the client, let LWC and Lightning Web Security manage the DOM, avoid lwc:dom="manual" and sinks such as parseFromString, prefer allowlisting and output encoding, and load third-party scripts only from static resources.
  • A Lightning web component appears in Lightning App Builder when isExposed is true and at least one target is set; targetConfigs limits objects and @api recordId receives the Id on record pages. Visualforce pages are reused in Lightning Experience (App Builder, quick actions, button overrides) and talk to LWC through Lightning Message Service; screen flows cover forms with logic without code.
  • Lightning Web Components builds on web standards that browsers run natively: a component needs at least an HTML and a JavaScript file with the same name, and its CSS is encapsulated by Shadow DOM. Information flows down from parent to child through @api properties and methods and up through CustomEvent and dispatchEvent; siblings use the events up, properties down pattern.
  • An Apex method called from a Lightning component must be static, public or global and annotated with @AuraEnabled; with cacheable=true it can be wired with @wire and refreshed with refreshApex, but it cannot run DML, which needs an imperative call. Flow and Agentforce use @InvocableMethod with input and output classes marked @InvocableVariable, whose descriptions guide the agent.

4. Testing, Debugging, and Deployment

20–20%

Testing, Debugging, and Deployment

  • Test classes use @IsTest, cannot see org data except objects such as User and Profile, and their records roll back when they finish. Data comes from brute force, factories, @TestSetup methods or CSV files loaded with Test.loadData(); Test.startTest() and Test.stopTest() give fresh limits and run asynchronous code. Flows are tested with Debug and View Tests.
  • Salesforce DX moves the source of truth to version control: the Dev Hub creates scratch orgs from config/project-scratch-def.json, and Salesforce CLI (sf) authorizes orgs, deploys and retrieves source, moves test data and assigns permissions. VS Code extensions run those commands from the palette, and Developer Console handles anonymous Apex, queries and test suites in the browser.
  • Debug logs are the main source: their levels (NONE to FINEST) are cumulative, and Developer Console checkpoints capture data without halting execution. Asynchronous Apex is monitored on Apex Jobs, the flex queue and with AsyncApexJob or CronTrigger queries; flows are debugged with Debug, and their scheduled actions appear on Time-Based Automations.
  • Apex is written in a sandbox or developer org and deployed to production with at least 75% coverage, all tests passing and some coverage on each trigger. Each environment has a role: Developer sandboxes to build, Partial Copy and Full for testing and staging, disposable scratch orgs. A package.xml lists the components; the release is validated, quick-deployed and the run list applied.