Salesforce Certified Platform Developer I Exam-style mock test
Salesforce Platform Developer I Practice Exams|Practice test
Full explanations
Exam format
Pass line 68%
33 USD One-time · lifetime access
Enroll →
Sample questions
Example1 · Salesforce Fundamentals and Data Modeling
A developer at NimbusDesk, a B2B SaaS company, notices that every custom field they create instantly appears in the UI without any server provisioning. A colleague asks why no infrastructure deployment is needed. Which characteristic of the Salesforce Platform best explains this behavior?
✓The platform is metadata-driven, so configuration changes update definitions that the runtime engine interprets dynamically
Correct. Salesforce stores customizations as metadata that the runtime interprets, so new fields appear immediately without provisioning.
・Each org runs on its own dedicated physical server that is rebuilt whenever a field is added
Incorrect. Salesforce is multitenant; orgs share infrastructure rather than dedicated rebuilt servers.
・Custom fields are compiled into native machine code and pushed to edge servers during a nightly batch process
Incorrect. Fields are not compiled to machine code or pushed to edge servers nightly.
・The browser caches the full schema, so the server never renders fields
Incorrect. The server interprets metadata at runtime; the browser does not hold the entire schema.
Explanation
The metadata-driven, multitenant architecture lets the runtime engine interpret configuration changes instantly without infrastructure deployment.
Example2 · Process Automation and Logic with Apex
At the B2B SaaS firm CloudBill, a developer writes an Apex trigger on the Subscription__c object that must copy the new Plan_Tier__c value into a related field only when records are being created. Which trigger context variable should the developer check to run this logic only for new records?
✓Trigger.isInsert combined with Trigger.isBefore in the context
Correct. Trigger.isInsert is true for insert events, and pairing it with Trigger.isBefore scopes the logic to new records before they are saved.
・Trigger.oldMap, because it holds the records being inserted
Incorrect. Trigger.oldMap is null during insert because there are no prior versions of the records yet.
・Trigger.isUpdate, since inserts and updates share the same context
Incorrect. Trigger.isUpdate is true only for updates, so it would skip the insert scenario the developer needs.
・Trigger.size, which returns true during inserts
Incorrect. Trigger.size returns an Integer count of records, not a Boolean, so it cannot gate an insert operation.
Explanation
Insert-only logic is scoped with Trigger.isInsert, and Trigger.isBefore ensures it runs before the save.
Example3 · User Interface with Visualforce and Lightning Web Components
A developer at a B2B SaaS company is building a new customer-facing onboarding screen that must run inside the Lightning Experience App Builder, support reactive data binding, and align with Salesforce's modern, standards-based component model. Which technology should the developer choose for this interface?
・A Visualforce page wrapped in a Lightning component for the App Builder
Incorrect. Wrapping Visualforce adds legacy overhead and does not provide the native reactive binding of the modern model.
✓A Lightning web component dropped natively into App Builder
Correct. Lightning web components are the modern, standards-based framework and drop natively into App Builder with reactive properties.
・A deprecated s-control hosted in a custom tab
Incorrect. S-controls are deprecated and cannot be used in Lightning Experience App Builder at all.
・A Visualforce component referenced by an apex:include directive
Incorrect. apex:include is a Visualforce directive and does not deliver the reactive, App Builder-ready model requested here.
Explanation
Lightning web components are the recommended modern framework, use standard web technologies, offer reactive data binding, and are natively available in the Lightning App Builder.
Example4 · Testing, Debugging, and Deployment
A developer at a healthcare services firm must test a trigger that updates the Patient Status field on Account records. The test needs to confirm the field holds the expected value after the DML runs. Which approach should the developer use inside the test method?
✓Insert the Account, re-query the record after the DML, then assert the Patient Status value with System.assertEquals
Correct. Re-querying the record after DML and asserting with System.assertEquals verifies the trigger produced the expected value.
・Insert the Account and inspect the debug log output manually to confirm the value changed
Incorrect. Reading debug logs by hand is not an automated assertion and does not verify functionality in a test.
・Use the @IsTest annotation alone and assume coverage verifies the value
Incorrect. The @IsTest annotation marks a test class but does not by itself verify any field value.
・Deploy the trigger to production first and watch the record list view
Incorrect. Tests must run before deployment, and watching a list view is not an automated verification technique.
Explanation
Good tests insert data, execute the logic, re-query, and assert the expected outcome rather than relying on manual inspection.
Example5 · Salesforce Fundamentals and Data Modeling
A healthcare services firm wants to auto-populate a Patient Intake record's 'Triage Priority' field whenever related fields change, with no retry logic needed. The admin can configure it, but the lead developer insists on code. Which choice best reflects Salesforce platform best practice?
✓Use a record-triggered flow, since declarative tools should be preferred for logic that can be built without code
Correct. Salesforce best practice is to use declarative tools like a record-triggered flow when the requirement can be met without code.
・Write an Apex trigger, since automation touching patient data should be coded in Apex for auditing
Incorrect. No platform rule forces Apex for patient data; declarative automation respects auditing too.
・Build a Visualforce page with a controller extension that recalculates the priority on every page load for the intake team
Incorrect. A Visualforce page only recalculates during a user's page view and does not reliably maintain the field.
・Create a scheduled Apex job that scans every Patient Intake record nightly and updates the Triage Priority based on the latest related field values
Incorrect. A nightly batch introduces delay and unnecessary processing when the value should update immediately on change.
Explanation
The platform favors declarative automation first; a record-triggered flow handles field recalculation on change without code.
Example6 · Salesforce Fundamentals and Data Modeling
At the healthcare firm, each Lab_Result__c record must belong to exactly one Patient__c record, must be deleted when its patient is deleted, and the patient's owner should control sharing of the results. Which relationship should the developer configure on Lab_Result__c?
・A lookup relationship to Patient__c so the link between the records stays optional
Incorrect. A lookup is optional and neither cascades deletes nor inherits sharing from the parent.
✓A master-detail relationship to Patient__c making the patient a required parent, cascading deletes and inheriting sharing
Correct. A master-detail relationship enforces a required parent, cascades deletes, and inherits ownership and sharing from the master.
・A hierarchical relationship referencing the Patient__c custom object record directly
Incorrect. Hierarchical relationships apply only to the User object, not custom patient data.
・A many-to-many junction object joining the Patient__c and Lab_Result__c records
Incorrect. A junction models many-to-many links, but each result belongs to one patient.
Explanation
Required parent, cascade delete, and inherited sharing are defining traits of a master-detail relationship.
Example7 · Salesforce Fundamentals and Data Modeling
A developer at UrbanThread, a retail apparel brand, notices that a daily batch job hits governor limits during peak hours but not overnight. Which characteristic of the Lightning Platform best explains why these limits exist?
・The org simply uses too many custom objects for its storage tier
Incorrect. The number of custom objects does not cause per-transaction governor limits to be enforced.
・Governor limits are random and reset based on each user login event
Incorrect. Governor limits are deterministic and tied to transaction context, not login activity.
✓The platform is multitenant, so these governor limits protect the shared compute and storage resources used across many tenants
Correct. Multitenancy means many orgs share infrastructure, so governor limits keep one tenant from monopolizing the shared compute and storage resources.
・Apex code must be fully recompiled whenever a transaction exceeds its CPU budget
Incorrect. Apex is compiled when saved, not recompiled whenever a CPU budget is exceeded during execution.
Explanation
Governor limits exist because the Lightning Platform is multitenant: shared compute and storage require per-transaction limits to protect all tenants.
Example8 · Salesforce Fundamentals and Data Modeling
UrbanThread needs to track in-store appointments its stylists book with shoppers, including follow-ups and reminders tied to a contact. Which standard object should the developer use before building anything custom?
・The standard Lead prospect object
Incorrect. Lead represents an unqualified prospect, not a scheduled appointment with a known contact.
✓The Event object
Correct. Event is the standard object for scheduled appointments tied to contacts and other records.
・The standard Asset ownership object
Incorrect. Asset tracks products a customer owns, not booked appointments.
・The standard Product catalog object
Incorrect. Product represents catalog items, not scheduled meetings.
Explanation
The Event standard object already models scheduled appointments with reminders and relationships to contacts, so no custom object is needed.
Example9 · Salesforce Fundamentals and Data Modeling
On UrbanThread's custom Order and Order_Line__c objects, the developer wants deleting an order to delete its line items and allow roll-up summaries of line totals. Which relationship type should be used?
・A standard lookup relationship on Order
Incorrect. A lookup does not cascade deletes and does not support roll-up summary fields.
・A hierarchical relationship defined on the User object
Incorrect. A hierarchical relationship applies only to the User object.
・An external lookup to an outside system
Incorrect. An external lookup links to records in an external system, not internal cascade behavior.
✓A master-detail relationship from Order_Line__c to Order
Correct. Master-detail cascades deletes and enables roll-up summary fields on the parent.
Explanation
Master-detail relationships provide cascade delete and roll-up summary capability, which match both requirements.
Example10 · Salesforce Fundamentals and Data Modeling
A financial services firm needs to automatically email a client when their Loan application Status changes to Approved. An admin can build this without code. Which tool should the developer recommend to meet this requirement?
✓A Record-Triggered Flow sending the client email
Correct. A Record-Triggered Flow is a declarative tool that fires on record changes and can send an email, satisfying the no-code requirement.
・An Apex trigger querying the Loan object and emailing the client
Incorrect. An Apex trigger is a programmatic solution and is unnecessary when a declarative flow meets the requirement.
・A Visualforce page with a controller extension and action
Incorrect. A Visualforce page renders UI and does not automatically react to a field value changing on a record.
・A Lightning web component bound to the Loan page layout
Incorrect. A Lightning web component builds custom UI and does not run automation when a status field is updated server-side.
Explanation
Salesforce guidance favors declarative automation first; a Record-Triggered Flow handles record changes and emails without code.
Example11 · Salesforce Fundamentals and Data Modeling
A developer at an investment bank creates a custom object named Portfolio to track client holdings. What is the API name that Salesforce assigns to this custom object?
・The API name stays simply Portfolio with no suffix
Incorrect. Only standard objects use the plain name; custom objects receive a suffix.
・The API name uses the external suffix Portfolio__x for objects
Incorrect. The __x suffix identifies external objects, not standard custom objects stored in Salesforce.
✓The API name becomes Portfolio__c with a custom suffix
Correct. Custom objects created in the org are given the __c suffix on their API name.
・The API name is not assigned yet
Incorrect. The API name is assigned immediately when the object is created, not only after deployment.
Explanation
Custom objects always carry the __c API name suffix, distinguishing them from standard and external objects.
Example12 · Salesforce Fundamentals and Data Modeling
A consulting firm tracks Engagements and Consultants. Each Engagement must always have one assigned Consultant, and when a Consultant record is deleted, the firm wants all related Engagement records to be deleted automatically. Which relationship should the developer configure from Engagement to Consultant?
・A lookup relationship, since it best keeps the Consultant optional on each record
Incorrect. A lookup relationship is loosely coupled and does not cascade-delete child records when the parent is removed.
✓A master-detail relationship, with Consultant as the master object
Correct. Master-detail makes the child required and cascades deletes from the master Consultant to its detail Engagements.
・A hierarchical relationship defined directly on the Engagement object
Incorrect. Hierarchical relationships apply only to the User object, not to custom objects like Engagement.
・An external lookup to the Consultant external ID
Incorrect. External lookups point to records held outside the org via an external data source, which does not fit this requirement.
Explanation
Master-detail enforces a required parent and cascades deletion, matching the mandatory-link and auto-delete requirements.
Example13 · Salesforce Fundamentals and Data Modeling
On a consulting firm's org, a developer defines a master-detail relationship from Timesheet (detail) to Engagement (master). Which behaviors can the developer now rely on for Timesheet records? (Choose two.)
✓Roll-up summary fields can be created on the Engagement record
Correct. Roll-up summary fields are available on the master side of a master-detail relationship.
✓Each Timesheet inherits the sharing and security of its parent Engagement
Correct. Detail records inherit the sharing and ownership settings of the master record.
・A Timesheet can exist with no related Engagement selected
Incorrect. The detail record requires a master; it cannot be saved without one.
・The master object's standard page layout is copied onto the detail object
Incorrect. Page layouts are defined per object and are not copied from master to detail.
Explanation
Master-detail provides roll-up summaries on the master and forces detail records to inherit parent sharing while requiring a parent.
Example14 · Salesforce Fundamentals and Data Modeling
A manufacturing distributor needs a field on Purchase Order that always shows the supplier's current credit rating pulled live from the related Supplier record. The value must update automatically and no editing is allowed. Which approach should the developer recommend first?
✓Build a cross-object formula field on Purchase Order
Correct. A cross-object formula field displays the related Supplier value live, is read-only, and needs no code.
・Write an Apex trigger on Supplier
Incorrect. A trigger is programmatic overkill and does not keep a displayed value dynamic without storing it.
・Create a scheduled batch class to copy the value nightly
Incorrect. A nightly batch introduces latency and will not show the current rating in real time.
・Add a Visualforce page that queries the supplier on load
Incorrect. A Visualforce page adds UI complexity and does not create a field on the record.
Explanation
Declarative cross-object formula fields are the first choice for live, read-only related values.
Example15 · Salesforce Fundamentals and Data Modeling
The distributor wants each Shipment Line to be owned by its parent Shipment, to be deleted when the Shipment is deleted, and to roll up a total weight onto the Shipment. Which relationship best fits Shipment Line to Shipment?
・A lookup relationship type
Incorrect. A lookup does not cascade delete or support native roll-up summaries by itself.
✓A standard master-detail parent-child relationship type
Correct. A master-detail relationship gives cascade delete, inherited ownership, and roll-up summary fields.
・A self-serve hierarchical relationship
Incorrect. A hierarchical relationship applies only to the User object for self-references.
・An external lookup relationship type
Incorrect. An external lookup relates to external objects, not standard child records.
Explanation
Master-detail provides cascade delete, ownership inheritance, and roll-up summaries.
▶ Try 10 free questions (graded)