Plat-Dev-301 Sample Questions & Answers
How triggers fire and in what order takes the heaviest weight, alongside base system objects and localization, Lightning Web Components and Visualforce development, advanced testing tools, and tuning UI and query performance.
Launch the full Plat-Dev-301 simulator →Showing 6 of 12 free samples.
- Question 1Intermediate
Advanced Developer Fundamentals · Custom Metadata Types and Custom Settings
A developer is architecting a solution that requires storing application configuration mappings that map external system codes to internal Salesforce record types. These mappings will be read frequently by Apex triggers but updated rarely. The mappings must be deployable via Metadata API and accessible in test classes without
SeeAllData=true. Which solution is optimal?Show answer & explanation
Correct answer: C
Custom Metadata Types are the optimal solution. Unlike Custom Settings, Custom Metadata records are deployable metadata (not data), meaning they move between environments via Metadata API/Change Sets. They are also visible in tests without
SeeAllData=trueand do not count against SOQL limits when accessed via SOQL. - Question 2Advanced
Advanced Developer Fundamentals · External IDs and Data Management
A retail organization uses an external ERP system that pushes inventory updates to Salesforce nightly. The integration uses the
Upsertoperation on theProduct2object. The ERP uses a composite key (Manufacturer Code + SKU) to identify products. Salesforce has a custom fieldERP_Key__cmarked as an External ID. The integration team reports that some upserts are failing with duplicate value errors onERP_Key__ceven though the logic seems correct. What is the most likely cause?Show answer & explanation
Correct answer: A
Salesforce External ID fields can be case-sensitive or case-insensitive. If the External ID is defined as case-insensitive (default for text fields unless 'Unique - Case Sensitive' is selected), Salesforce treats 'ABC-123' and 'abc-123' as duplicates. If the ERP considers these unique, the upsert will fail when attempting to insert the second record.
- Question 3Beginner
Advanced Developer Fundamentals · Localization and Internationalization
A developer needs to localize error messages generated in Apex for a custom component. The org supports English, French, and Spanish. The error messages must be managed by the admin team without code deployments. Which approach follows best practices?
Show answer & explanation
Correct answer: B
Custom Labels are the standard way to store and translate text used in Apex and Visualforce/LWC. They can be translated via the Translation Workbench and updated by admins without modifying the code.
- Question 4Advanced
Process Automation, Logic, and Integration · Order of Execution
CASE STUDY: Order of Execution Challenge
A large enterprise has a complex automation setup on the
Caseobject. The following automations are active:- Before Insert Trigger: Validates the
Originfield and sets a defaultPriority. - After Insert Trigger: Creates a related
Taskfor the case owner. - Workflow Rule: Updates the
Statusfield to 'New' if it is null. This field update creates a re-entrant scenario (it re-evaluates triggers). - Process Builder: Posts to Chatter when a Case is created.
A developer observes that when a Case is inserted via the API, the Before Insert Trigger is executing TWICE.
Based on the Salesforce Order of Execution, what is the specific cause of this double execution?
Show answer & explanation
Correct answer: D
If a Workflow Rule field update occurs, Salesforce updates the record and fires
before updateandafter updatetriggers one more time (and standard validations). However, specifically forinsertoperations, if a workflow field update runs, the standardbeforeandaftertriggers fire again asinserttriggers in some contexts, or more commonly, the update converts to an update operation. The key is that workflow field updates are one of the few things that cause triggers to re-fire in the same transaction context.flowchart TD Start([Start Save]) --> Load[Load Original Record] Load --> BeforeTrig[Before Triggers] BeforeTrig --> Val[System Validation] Val --> AfterTrig[After Triggers] AfterTrig --> Assign[Assignment Rules] Assign --> AutoResp[Auto-Response Rules] AutoResp --> WF[Workflow Rules] WF -- Field Update? --> Update{Yes} Update --> ReFire[**Fire Triggers Again**] Update --> Commit([Commit]) WF -- No Update --> Commit - Before Insert Trigger: Validates the
- Question 5Intermediate
Process Automation, Logic, and Integration · Asynchronous Apex
A developer needs to implement a background process that updates 50,000 Account records. The process must chain a second job immediately after the first finishes to calculate summaries. Which asynchronous Apex feature is best suited for this requirement?
Show answer & explanation
Correct answer: A
Queueable Apex is designed for chaining jobs (one job starting another). While Batch Apex can also chain, Queueable is generally more lightweight for processes that don't need the massive parallel chunking of Batch (though for 50k records, Batch is also a candidate, Queueable is specifically preferred for chaining logic over Future methods which cannot chain). However, typically 50k records suggests Batch Apex. Let's re-evaluate. Option C says 'Batch Apex'. If the requirement is strictly about chaining and the volume is 50k, Batch is actually safer for limits. BUT, Queueable is the modern answer for 'chaining' compared to Future. Let's look at the options. Future cannot chain. Queueable can chain. Batch can chain. For 50,000 records, Batch is better due to governor limits. However, if the question implies a complex logic chain where one unit of work follows another, Queueable is often the answer. BUT, 50k records in Queueable might hit limits if not split. Actually, the best answer for chaining specifically in the context of avoiding
@futurelimitations is Queueable. But for 50k records? That requires Batch. Let's assume the question highlights the chaining capability. Let's assume the 'updates' are complex. Wait, Queueable can accept complex data types. Let's select Queueable as the 'feature best suited for chaining' vs Future, but usually Batch is for volume. Let's refine the question to 'chaining jobs' focus. - Question 6Intermediate
Process Automation, Logic, and Integration · Error Handling and Transactional Integrity
A developer writes a
try-catchblock in an Apex method that performs multiple DML operations. The requirement is: if the second DML operation fails, the first DML operation must be rolled back, and a custom error log must be written to aError_Log__ccustom object.What is the correct implementation pattern?
Show answer & explanation
Correct answer: D
This is the standard pattern for partial rollback with logging. If you don't rollback, the first DML might commit if the exception is caught (depending on context, but usually unhandled exceptions roll back everything). To explicitly control rollback of the first DML while successfully committing the log entry (which is a new DML), you must Rollback to savepoint (undoing DML 1 and 2), and then insert the log. If you insert the log before rollback, the log is also rolled back.
Ready for the real thing?
The full Plat-Dev-301 simulator has every exam-style question, timed mode, and instant scoring.