Salesforce Platform Developer (Plat-Dev-201) Exam Questions Salesforce Platform Developer (Plat-Dev-201) Exam Questions

Page content

Comprehensive list of Free Salesforce Platform Developer (Plat-Dev-201) Exam Questions curated for cracking the exam in first attempt.

Disclaimer: Salesforce is a protected Brand. These exam questions are neither endorsed by nor affiliated with Salesforce. These are not the Salesforce official exam questions/dumps. These questions cover all the topics and objectives of the Salesforce Certified Platform Developer (Plat-Dev-201) and once you go through these questions and their concepts, you are more than ready to crack the exam in first attempt.

About Exam


  1. You need to solve 60 multiple-choice/multiple-select questions (plus upto 5 non-scored questions) in 105 min. These non-scored questions are used by Salesforce to gather data on question performance and to potentially include them in future exams and they are not counted towards the final score.
  2. You attend the Proctored exam at a testing center or in an online proctored environment. No hard-copy or online materials may be referenced during the exam.
  3. Passing score is 41/60 (68%) means you should answer at least 41 (out of 60) questions correctly. No negative scoring so answer all the questions!
  4. You get the result (Pass or Fail) once you submit the exam.
  5. Refer to the Official Exam Guide

Free Exam Questions


*Universal Containers’ recruiting app allows candidates to apply for multiple jobs and each job to have multiple applicants. Which data model should a developer implement?

✅ A. Create a junction object with two master‑detail relationships to the candidate and job objects.
⬜ B. Use a lookup relationship on the candidate object to the job object.
⬜ C. Use a master‑detail relationship on the candidate object to the job object.
⬜ D. Use a formula field to associate candidates and jobs.

Explanation:-
● A many‑to‑many relationship in Salesforce is implemented by creating a custom junction object with two master‑detail relationships—one to each of the two participating objects.
● This model allows each candidate to relate to many jobs and each job to relate to many candidates while maintaining relational integrity.
● A single lookup or master‑detail field (options B and C) only supports one‑to‑many, and a formula field (D) can’t create or maintain relationship records.
Source: https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/relationships_among_objects.htm
Topic: Developer Fundamentals

*A developer created a custom order management app that uses an Apex class. The order is represented by an Order object and an OrderItem object that has a master-detail relationship to Order. During order processing, an order may be split into multiple orders. What should a developer do to allow their code to move some existing OrderItem records to a new Order record?

⬜ A. Add without sharing to the Apex class declaration.
⬜ B. Change the master-detail relationship to an external lookup relationship.
⬜ C. Create a junction object between OrderItem and Order.
✅ D. Select the Allow reparenting option on the master-detail relationship.

Explanation:-
● In Salesforce, child records in a master-detail relationship can’t be reparented by default; admins can enable Allow reparenting so a child (OrderItem) can be moved to a different parent (Order).
● This is a configuration on the master-detail field and is the most direct way to support splitting an Order by moving OrderItems.
● Why others are wrong: “without sharing” (A) affects sharing rules, not parent-child reassignment; switching to external lookup (B) is unnecessary and changes the data model; a junction object (C) is for many-to-many, not required here.
Source: https://help.salesforce.com/s/articleView?id=platform.relationships_considerations.htm&language=en_US&type=5
Topic: Developer Fundamentals

*A company decides to implement a new process where every time an Opportunity is created, a follow-up Task should be created and assigned to the Opportunity Owner. What is the most efficient way for a developer to implement this?

⬜ A. Apex trigger on Task
⬜ B. Task actions
⬜ C. Auto-launched flow on Task
✅ D. Record-triggered flow on Opportunity

Explanation:-
● A record-triggered Flow on Opportunity (after-save) can immediately create a Task for the Opportunity Owner—clicks not code—aligned with Salesforce’s recommendation to use Flow for record-triggered automation.
● Why others are wrong: A Task trigger (A) is indirect and code-heavy; Task actions (B) require user invocation; an auto-launched flow on Task (C) won’t fire when an Opportunity is created.
Source: https://help.salesforce.com/s/articleView?id=platform.ls_create_record_triggered_flow.htm&language=en_US&type=5
Source: https://architect.salesforce.com/decision-guides/trigger-automation
Topic: Developer Fundamentals

*How can a developer check the test coverage of autolaunched flows before deploying them in a change set?

⬜ A. Use the ApexTestResult class.
⬜ B. Use the Code Coverage Setup page.
✅ C. Use SOQL and the Tooling API.
⬜ D. Use the Flow Properties page.

Explanation:-
● Test coverage for flows is not displayed in Flow Builder. Salesforce exposes flow coverage information through the Tooling API; the FlowTestCoverage object can be queried via SOQL to determine coverage percentages.
● There’s no dedicated “Coverage” page or Assignment class for flows, and the Flow Properties page doesn’t compute coverage statistics.
Source: https://developer.salesforce.com/docs/atlas.en-us.api_tooling.meta/api_tooling/tooling_api_objects_flowtestcoverage.htm

*A developer must perform a complex SOQL query that joins two objects in a Lightning component. How can the Lightning component execute the query?

⬜ A. Write the query in a custom Lightning web component wrapper and invoke from the Lightning component.
✅ B. Invoke an Apex class with the method annotated as @AuraEnabled to perform the query.
⬜ C. Use the Salesforce Streaming API to perform the SOQL query.
⬜ D. Create a flow to execute the query and invoke from the component.

Explanation:-
● An Apex method annotated with @AuraEnabled exposes server‑side logic to Lightning components. Such methods can execute SOQL queries and return results to the componenthttps://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_annotation_AuraEnabled.htm.
● Lightning Web Components cannot run SOQL on the client. The Streaming API broadcasts event notifications rather than ad‑hoc query results, and flows are not intended for complex joins.
Source: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_annotation_AuraEnabled.htm

A development team wants to automatically deploy to a sandbox after merging into the main branch. Which two tools should the team use to implement this script? (Choose two.)

⬜ A. Developer Console
✅ B. Visual Studio Code
✅ C. Salesforce CLI (SFDX)
⬜ D. Change Sets

Explanation:-
● The Salesforce CLI (SFDX) provides commands like sf project deploy start that deploy local source to non‑source‑tracked orgs such as sandboxes.
Visual Studio Code, paired with the Salesforce Extension Pack, integrates the CLI and can run deployment scripts as part of a continuous integration pipeline.
● Developer Console and Change Sets are manual tools not suitable for automated deployment scripts.
Source: https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_develop_any_org.htm

A maintenance team processes repairs on Container objects. The Status__c picklist transitions through values such as Received, In‑Progress, Repaired, and Released. When the status changes to Repaired, an external system must be notified automatically. What should the developer implement?

⬜ A. Record‑triggered flow
⬜ B. Apex trigger
⬜ C. Apex callouts
✅ D. Platform event

Explanation:-
Platform events provide a publish‑subscribe model to deliver notifications from Salesforce to external systems. The developer guide notes that platform events use event messages to communicate changes and integrate external processes asynchronously.
● A record‑triggered flow or trigger could call an outbound message, but platform events are designed specifically for asynchronous notifications and scale well for external integrations. Apex callouts would require custom code and synchronous processing.
Source: https://developer.salesforce.com/docs/atlas.en-us.platform_events.meta/platform_events/platform_events_overview.htm

Which annotation exposes an Apex class as a RESTful web service?

⬜ A. @ReadOnly
✅ B. @RestResource(urlMapping='/yourUrl')
⬜ C. @HttpDelete
⬜ D. @RemoteAction

Explanation:-
● To expose an Apex class as a REST resource, Salesforce provides the @RestResource annotation. It defines a urlMapping that determines the URL path for the service.
@HttpDelete is a method‑level annotation for handling DELETE requests, @ReadOnly optimizes queries in read‑only contexts, and @RemoteAction makes methods available to Visualforce but not as REST services.
Source: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_annotations_rest.htm

Which two Salesforce CLI commands can a developer use to add test data to a Developer sandbox? (Choose two.)

✅ A. force:data:tree:import
⬜ B. force:data:object:create
✅ C. force:data:bulk:upsert
⬜ D. force:data:async:upsert

Explanation:-
● The force:data:tree:import (or sf data import tree) command imports hierarchical JSON data into an org, preserving parent‑child relationships.
● The force:data:bulk:upsert (alias sf data upsert bulk) command uses Bulk API 2.0 to insert or update large volumes of records, making it suitable for loading test data.
● The command force:data:object:create is not valid; creating a single record uses data create record. There is no standard command named force:data:async:upsert.
Source: https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/cli_reference_data_commands.htm

*A developer is creating an app that contains multiple Lightning web components. One of the child components is used for navigation purposes. When a user clicks a button called Next in the child component, the parent component must be alerted so it can navigate to the next page. How should this be accomplished?

⬜ A. Update a property on the parent.
⬜ B. Call a method in the Apex controller.
⬜ C. Fire a notification.
✅ D. Create a custom event.

Explanation:-
● According to Salesforce’s Lightning Web Components guidance, a child component communicates with its parent by dispatching a custom event. The Trailhead project on component communication states that “a child component dispatches a custom event that triggers an update in the parent component”.
● Updating a public property on the parent (A) doesn’t automatically trigger an action, calling Apex (B) is unnecessary for client‑side communication, and Salesforce doesn’t provide a generic “notification” mechanism (C) for this use case.
Source: https://trailhead.salesforce.com/content/learn/projects/communicate-between-lightning-web-components/communicate-from-child-to-parent
Topic: User Interface - Lightning Component Framework

*Universal Containers (UC) wants to lower its shipping cost while making the shipping process more efficient. The Distribution Officer advises UC to implement Global Addresses to allow multiple Accounts to share a default pickup address. The developer is tasked to create the supporting object and relationship using the Setup menu. Which field should the developer add to create the most efficient model that supports the business need?

⬜ A. Add a master‑detail field on the Global Address object to the Account object.
⬜ B. Add a master‑detail field on the Account object to the Global Address object.
⬜ C. Add a lookup field on the Global Address object to the Account object.
✅ D. Add a lookup field on the Account object to the Global Address object.

Explanation:-
● In a master‑detail relationship the parent (master) controls record ownership and security for the child; the child’s Owner field isn’t available and child records inherit sharing and security from the parent.
● Because the detail record can’t exist without its master and can’t have multiple parents, master‑detail is unsuitable for sharing one Global Address with many Accounts.
● A lookup relationship on the Account to Global Address establishes a one‑to‑many relationship: multiple Accounts can reference the same Global Address without transferring ownership or cascading delete; lookups allow independent sharing settings.
● Placing the lookup field on the Global Address (option C) would only allow each address to reference a single Account, while master‑detail options (A and B) incorrectly model the data and restrict reparenting.
Source: https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/relationships_among_objects.htm

*A developer is alerted to an issue with a custom Apex trigger that is causing records to be duplicated. What is the most appropriate debugging approach to troubleshoot the issue?

✅ A. Use the Apex Interactive Debugger to step through the code and identify the issue.
⬜ B. Disable the trigger in production and test to see if the issue still occurs.
⬜ C. Review the Historical Event logs to identify the source of the issue.
⬜ D. Add System.debug statements to the code to track the execution flow and identify the issue.

Explanation:-
● The Apex Interactive Debugger allows developers to set breakpoints, step through Apex code line‑by‑line, inspect variables and the call stack, and diagnose issues interactively. This makes it the most direct way to pinpoint the logic that causes duplicate records.
● Disabling the trigger in production (B) is disruptive and doesn’t show where the duplication occurs.
● Historical event logs (C) provide high‑level audit information but don’t allow line‑level debugging.
System.debug statements (D) can help, but they require redeploying code and sifting through large logs; the interactive debugger is more efficient.
Source: https://developer.salesforce.com/docs/atlas.en-us.code_builder.meta/code_builder/apex_interactive_debugger.htm

*How can a developer check the test coverage of autolaunched flows before deploying them in a change set?

⬜ A. Use the Assignment class.
⬜ B. Use the command Coverage setup page.
✅ C. Use SOQL and the Tooling API.
⬜ D. Use the Flow Properties page.

Explanation:-
● Flow test coverage isn’t surfaced in the Flow Builder UI. Salesforce exposes coverage data through the Tooling API. The FlowTestCoverage object represents test coverage for a flow or process and can be queried via SOQL to determine which flows meet coverage requirements.
● There is no “Assignment class” or generic “Coverage” setup page that calculates flow coverage.
● The individual Flow Properties page doesn’t compute organization‑wide test coverage.
Source: https://developer.salesforce.com/docs/atlas.en-us.api_tooling.meta/api_tooling/tooling_api_objects_flowtestcoverage.htm
Topic: Testing, Debugging, and Deployment

*A developer writes a trigger on the Account object on the before update event that increments a count field. A record‑triggered flow also increments the count field every time an Account is created or updated. What is the value of the count field if an Account is inserted with an initial value of zero, assuming no other automation logic is implemented on the Account?

⬜ A. 2
✅ B. 1
⬜ C. 3
⬜ D. 4

Explanation:-
● Salesforce’s order of execution runs before‑save record‑triggered flows before executing any before triggers.
● During an insert, the described trigger is a before update trigger, so it doesn’t run on insert. Only the before‑save flow increments the count, resulting in a value of 1.
● Higher values would require both the flow and the trigger to fire on insert, which they don’t.
Source: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_triggers_order_of_execution.htm
Topic: Process Automation and Logic - Apex Classes and Triggers

A developer writes a trigger on the Account object on the before update event that increments a count field. A workflow rule also increments the count field every time that an Account is created or updated. The field update in the workflow rule is configured to not re-evaluate workflow rules. What is the value of the count field if an Account is inserted with an initial value of zero, assuming no other automation logic is implemented on the Account?

⬜ A. 1
⬜ B. 3
⬜ C. 4
✅ D. 2

Explanation:-
● On insert, both the before trigger and workflow rule increment the count once.
● Workflow field update is configured to not cause recursion, so it does not re-trigger automation.
● Thus, total increments = 2 → final value = 2.
Source: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_triggers_order_of_execution.htm
Topic: Process Automation and Logic - Apex Classes and Triggers

*A company tracks Container objects and wants to enforce that only containers with a status of Decommissioned can be deleted. The solution must be configured without code. Which automation should the developer use?

✅ A. Apex Trigger
⬜ B. Before record‑triggered flow
⬜ C. Validation rule
⬜ D. After record‑triggered flow

Explanation:-
● Only an Apex trigger with a before delete event can prevent deletion of a record based on a condition; record‑triggered flows don’t currently support a before‑delete context for blocking deletes, and validation rules can’t reference the ISDELETED status to stop deletion.
● In a trigger’s before delete context, you can call addError() to throw an error and stop the deletion if the container status isn’t ‘Decommissioned’.
● After‑save flows (D) fire after the record is deleted and thus can’t prevent the operation.
Source: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_triggers_events.htm
Topic: Process Automation and Logic - Apex Classes and Triggers

Managers at Universal Containers want to ensure that only decommissioned containers can be deleted. A picklist value “Decommissioned” has been added to the Status__c field on the Container__c object. Which tool should the developer use to enforce that only records with a status of Decommissioned can be deleted?

✅ A. Apex Trigger
⬜ B. Before record‑triggered flow
⬜ C. Validation rule
⬜ D. After record‑triggered flow

Explanation:-
● Only an Apex trigger with a before delete event can stop the deletion of a record. In the trigger, the developer can check the container’s status and call addError() to prevent deletion if the status isn’t “Decommissioned”.
● Record‑triggered flows don’t have a before‑delete context, and validation rules can’t reference ISDELETED or prevent deletion after the fact. An after‑save flow fires too late to block the deletion.
Source: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_triggers_events.htm
Topic: Process Automation and Logic - Apex Classes and Triggers

*A developer must perform a complex SOQL query that joins two objects in a Lightning component. How can the Lightning component execute the query?

⬜ A. Write the query in a custom Lightning web component wrapper and invoke from the Lightning component.
✅ B. Invoke an Apex class with the method annotated as @AuraEnabled to perform the query.
⬜ C. Use the Salesforce Streaming API to perform the SOQL query.
⬜ D. Create a flow to execute the query and invoke from the Lightning component.

Explanation:-
● Apex methods annotated with @AuraEnabled expose server‑side logic to Lightning components. Such methods can execute complex SOQL queries and return data to the component.
● Client‑side code in LWC cannot run SOQL directly; the Streaming API delivers event messages rather than query results.
● While flows can create records or perform simple queries, complex joins are typically handled in Apex for efficiency.
Source: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_annotation_AuraEnabled.htm

*A maintenance team processes repairs on containers. The Status picklist transitions through Received, In‑Progress, Repaired and Released. When the status changes to Repaired, an external system must be notified automatically. What should the developer implement?

⬜ A. Record‑triggered Flow
⬜ B. Apex Trigger
⬜ C. Apex Callouts
✅ D. Platform Event

Explanation:-
Platform events provide a publish‑subscribe model to send notifications to external systems; an event message can trigger subscribers inside or outside Salesforce to act. Salesforce documentation notes that platform events simplify communication without complex logic, and subscribers can listen and carry out actions based on event messages.
● A record‑triggered flow or trigger could call an outbound message, but a platform event is designed specifically for asynchronous notifications and scales better for external integrations.
● An Apex callout (C) would require custom code and handling of callout limits, whereas a platform event can be consumed by middleware that then performs the callout.
Source: https://developer.salesforce.com/docs/atlas.en-us.platform_events.meta/platform_events/platform_events_overview.htm

*Which three statements are accurate about debug logs? (Choose three.)

✅ A. Debug logs can be set for specific users, classes, and triggers.
✅ B. System debug logs are retained for 24 hours.
⬜ C. Only 20 debug logs are kept; the oldest logs are overwritten.
✅ D. Log levels are cumulative and don’t override each other.
⬜ E. The maximum size of a debug log is 5 MB.

Explanation:-
● Salesforce allows you to retain and manage debug logs for specific users, classes and triggers. Setting class or trigger trace flags lets you generate logs for those components.
System debug logs are retained for 24 hours; monitoring debug logs (used for automated monitoring) are retained for seven days.
● Log levels stack cumulatively—if a class trace flag sets a log level, user trace flags with higher verbosity don’t disable the lower levels.
● The debug log limits described by Salesforce state that each log must be 20 MB or smaller, and logs larger than 20 MB are truncated; the 5 MB size in option E is outdated. Salesforce retains logs until they expire; there is no fixed limit of 20 logs.
Source: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_debugging_debug_log.htm
Topic: Testing, Debugging, and Deployment

*Which annotation exposes an Apex class as a RESTful web service?

⬜ A. @ReadOnly
✅ B. @RestResource (urlMapping='/yourUrl')
⬜ C. @HttpDelete
⬜ D. @RemoteAction

Explanation:-
● Salesforce lists several Apex REST annotations for exposing classes and methods as RESTful web services; at the class level, the @RestResource annotation specifies that the class is a REST resource and defines a urlMapping for routing.
@ReadOnly optimizes queries in read‑only contexts; @HttpDelete is a method‑level annotation for HTTP DELETE; @RemoteAction exposes methods to Visualforce but not as REST services.
Source: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_annotations_rest.htm

A developer wants to retrieve Contacts whose Accounts have an Industry of ‘Technology’ and include each Contact’s child Job_Application__c records. Which SOQL query is valid?

⬜ A. SELECT Id, (SELECT Id FROM Job_Applications__r) FROM Contact WHERE Accounts.Industry = 'Technology'
✅ B. SELECT Id, (SELECT Id FROM Job_Applications__r) FROM Contact WHERE Account.Industry = 'Technology'
⬜ C. SELECT Id FROM Contact WHERE Account.Industry = 'Technology' AND (SELECT Id FROM Job_Applications__r)
⬜ D. SELECT Id, (SELECT Id FROM Job_Applications__r) FROM Contact WHERE Industry = 'Technology'

Explanation:-
● Salesforce relationship queries use dot notation to traverse parent fields. The correct syntax uses the singular relationship name: Account.Industry (not Accounts) when filtering contacts by a field on their parent account.
● To retrieve child records, a parent‑to‑child subquery uses the child relationship name (e.g., Job_Applications__r) inside parentheses after selecting the parent records.
● Options A and C use the plural Accounts, which is invalid. Option C attempts to include a subquery in the WHERE clause, which is not supported. Option D filters on Industry directly on Contact, which doesn’t exist.
Source: https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_relationships.htm
Topic: Process Automation and Logic - SOQL, SOSL, and DML

What are two benefits of using declarative customizations over code? (Choose two.)

⬜ A. Declarative customizations automatically generate test classes.
✅ B. Declarative customizations automatically update with each Salesforce release.
⬜ C. Declarative customizations cannot generate run time errors.
✅ D. Declarative customizations generally require less maintenance.

Explanation:-
● Salesforce’s platform lets admins customize objects, fields, workflows, reports and analytics without code. Because UI components and page layouts are generated automatically, declarative features stay current whenever the platform is updated, so the configuration continues to work with new releases.
● Point‑and‑click automation reduces maintenance; there’s no custom code to refactor, and updates don’t require deploying new Apex or JavaScript. The platform’s built‑in analytics always show the latest data.
● Declarative tools don’t automatically create test classes and they can still lead to runtime errors if misconfigured, so options A and C are incorrect.
Source: https://www.salesforce.com/eu/blog/2020/10/click-not-code.html

Universal Containers has an order management app that uses an Order object and an OrderItem object in a master‑detail relationship to Order. During order processing, an order may be split into multiple orders. What should a developer do to allow their code to move some existing OrderItem records to a new Order record?

⬜ A. Add without sharing to the Apex class declaration.
⬜ B. Change the master‑detail relationship to an external lookup relationship.
⬜ C. Create a junction object between OrderItem and Order.
✅ D. Select the Allow reparenting option on the master‑detail relationship.

Explanation:-
● In a master‑detail relationship, child records normally can’t change parents. Salesforce documentation notes that by default child records can’t be reparented, but an administrator can enable an Allow reparenting option on the relationship fieldhttps://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/relationships_among_objects.htm.
● Enabling reparenting lets an OrderItem be moved to a new Order record without breaking referential integrity, which is exactly what is needed when splitting an order.
● Changing the relationship type (B) or adding a junction object (C) alters the data model unnecessarily, and the without sharing keyword (A) affects sharing rules, not record parentage.
Source: https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/relationships_considerations.htm

A Visualforce page is being migrated to a Lightning web component using Lightning Data Service. What is an advantage of using Lightning Data Service in this scenario?

⬜ A. It automatically schedules asynchronous processes.
⬜ B. It requires an Apex controller for data access.
✅ C. It handles sharing rules and field‑level security for you.
⬜ D. It automatically writes test methods for the component.

Explanation:-
Lightning Data Service (LDS) lets a component read, create, edit or delete a record without Apex. LDS “handles sharing rules and field‑level security for you,” ensuring users only see and edit fields they have access to.
● LDS caches records and updates multiple components when data changes, improving performance. It doesn’t schedule asynchronous processes (A) or generate test methods (D), and it reduces reliance on Apex controllers (option B is incorrect).
Source: https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/data_service_considerations.htm
Topic: User Interface - Visualforce

What is one advantage of using Process Builder instead of Apex triggers for automation?

✅ A. Process Builder requires less maintenance and can be managed declaratively.
⬜ B. Process Builder can handle before-save logic more efficiently.
⬜ C. Process Builder supports complex transaction control.
⬜ D. Process Builder executes with the same flexibility as Apex.

Explanation:-
● Process Builder allows admins and developers to create automation without writing code, reducing maintenance effort.
● Apex triggers, however, are better for advanced scenarios like before-save logic (B), transaction control (C), or flexible execution (D).
Source: https://help.salesforce.com/s/articleView?id=sf.process_overview.htm

*A developer is tasked with building a custom Lightning web component to collect Contact information. The form will be shared among many different types of users in the org. There are security requirements that only certain fields should be edited and viewed by certain groups of users. Which input field component should be used?

⬜ A. force‑input‑field
⬜ B. u1‑1nput‑11e1a
⬜ C. aura‑input‑field
✅ D. lightning‑input‑field

Explanation:-
lightning‑input‑field is used inside lightning-record-edit-form and implements Lightning Data Service. Salesforce documentation notes that record‑edit forms “take care of field‑level security and sharing for you,” so users only see and edit fields they’re allowed to access.
force‑input‑field and the garbled option (B) aren’t real Lightning components; they wouldn’t compile.
aura‑input‑field is part of the Aura framework and doesn’t provide automatic field‑level security in Lightning Web Components.
Source: https://developer.salesforce.com/docs/component-library/bundle/lightning-record-edit-form/documentation

*The development team wants to automatically deploy to a sandbox after merging into the main branch. Which two tools should the team use to implement this script? (Choose two.)

⬜ A. Developer Console
✅ B. Visual Studio Code
✅ C. Salesforce CLI (SFDX)
⬜ D. Change Sets

Explanation:-
● Salesforce’s CLI (formerly SFDX) provides commands such as project deploy start that allow automated deployment of source files to a non‑source‑tracked org like a sandbox.
Visual Studio Code integrates with the Salesforce Extension Pack and the CLI to run deployment scripts from a continuous integration pipeline.
● Developer Console and Change Sets are manual, UI‑based tools and aren’t suited for automated deployments.
Source: https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_develop_any_org.htm

Universal Containers’ recruiting app allows applicants to apply for multiple jobs and each job to have multiple applicants. What should a developer implement to represent that an applicant has applied for a job?

✅ A. Create a junction object with two master‑detail relationships to the Applicant and Job objects.
⬜ B. Create a lookup field from Applicant to Job.
⬜ C. Create a master‑detail relationship from Applicant to Job.
⬜ D. Create a formula field on Applicant that references Job.

Explanation:-
● A junction object with master‑detail relationships to both parents is the standard way to model a many‑to‑many relationship in Salesforce.
● A single lookup or master‑detail field (options B and C) supports only one‑to‑many relationships, and a formula field (D) can’t create relationship records.
Source: https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/relationships_among_objects.htm

Universal Containers wants to update its Visualforce applications, built with a third‑party JavaScript framework, to match the look and feel of Lightning Experience. Which solution should a developer implement?

⬜ A. Rewrite the Visualforce pages as Lightning components.
⬜ B. Set the enableLightning attribute to true on the Visualforce pages.
⬜ C. Enable Available for Lightning Experience on the Visualforce pages.
✅ D. Incorporate the Salesforce Lightning Design System (SLDS) CSS into the JavaScript applications.

Explanation:-
● The Salesforce Lightning Design System (SLDS) is a CSS framework that lets developers build applications with the same styles, icons, and design tokens used in Lightning Experience without writing their own CSS. The documentation explains that SLDS “helps you build applications with the look and feel of Lightning Experience without writing a single line of CSS”.
● By importing the SLDS CSS into the existing Visualforce pages, the third‑party JavaScript apps automatically adopt Lightning styling, which is faster than rewriting all the pages.
● Options A, B, and C would either require a full rewrite, don’t exist (enableLightning), or simply control page availability but don’t change styling.
Source: https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/lightning_intro.htm

Which two characteristics are true for Aura component events? (Choose two.)

✅ A. They support bubbling and capture phases.
⬜ B. They are handled by an Apex controller directly.
✅ C. They can be handled by the component that fired the event.
⬜ D. They must be published in a managed package.

Explanation:-
● Aura component events are used for communication between components that have a containment relationship.
● They support bubbling and capture phases that define how the event propagates through the component hierarchy.
● The component that fires the event can also handle it, making option (C) correct.
● Apex controllers don’t directly handle component events (B), and events do not require managed packages (D).
Source: https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/events_component.htm

*Which two Salesforce CLI commands can a developer use to add test data to a Developer sandbox? (Choose two.)

✅ A. force:data:tree:import
⬜ B. force:data:object:create
✅ C. force:data:bulk:upsert
⬜ D. force:data:async:upsert

Explanation:-
● The sf data import tree (alias force:data:tree:import) command imports data from one or more JSON files in sObject tree format, preserving parent‑child relationships. Salesforce documentation states that it imports records into an org using files generated by sf data export tree.
● The sf data upsert bulk (alias force:data:bulk:upsert) command uses Bulk API 2.0 to insert or update large volumes of data; it’s appropriate for uploading thousands of test records.
force:data:object:create is not a valid CLI command; creating a single object record is done with data create record.
force:data:async:upsert isn’t a standard Salesforce CLI command.
Source: https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/cli_reference_data_commands.htm

*Which three statements are accurate about debug logs? (Choose three.)

✅ A. Debug logs can be set for specific users, classes, and triggers.
✅ B. System debug logs are retained for 24 hours.
⬜ C. Only 20 debug logs are kept; the oldest logs are overwritten.
✅ D. Log levels are cumulative and don’t override each other.
⬜ E. The maximum size of a debug log is 5 MB.

Explanation:-
● Salesforce allows you to create trace flags for specific users, classes, or triggers to capture debug logs.
● According to the debug log documentation, system debug logs are retained for 24 hours, while monitoring logs last seven days.
● Log levels are cumulative; setting a higher level includes events from lower levels. Salesforce states that each log must be 20 MB or smaller—not 5 MB—and there’s no fixed limit of 20 logs, so options C and E are incorrect.
Source: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_debugging_debug_log.htm

A developer needs to test a method that performs a SOQL query and DML updates. Which two best practices apply to writing the test class? (Choose two.)

✅ A. Use Test.startTest() and Test.stopTest() to isolate governor limits.
⬜ B. Use seeAllData=true to access production data.
✅ C. Insert necessary test data within the test class.
⬜ D. Run the test class in “System mode” to bypass validation.

Explanation:-
● Salesforce best practice requires creating your own test data rather than depending on production data.
● Wrapping execution in Test.startTest() and Test.stopTest() ensures limits are reset and captured correctly.
● Using seeAllData=true (B) is discouraged because it makes tests unreliable. Running tests in “System mode” (D) is not supported.
Source: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_testing.htm

A developer wants to get access to the standard price book in the org while writing a test class that covers an OpportunityLineItem trigger. Which method allows access to the price book?

⬜ A. Use Test.loadData() and a static resource to load a standard price book
⬜ B. Use @TestVisible to allow the test method to see the standard price book
✅ C. Use Test.getStandardPricebookId() to get the standard price book ID
⬜ D. Use @IsTest(SeeAllData=true) and delete the existing standard price book

Explanation:-
● Salesforce provides Test.getStandardPricebookId() to retrieve the Standard Price Book in test classes.
● This avoids the need for SeeAllData=true and ensures test isolation.
● Other approaches like @TestVisible or Test.loadData() do not apply here.
Source: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_testing_pricebookid.htm

Universal Containers wants to back up all of the data and attachments in its Salesforce org once month. Which approach should a developer use to meet this requirement?

⬜ A. Use the Data Loader command line
⬜ B. Create a Schedulable Apex class
⬜ C. Schedule a report
✅ D. Define a Data Export scheduled job

Explanation:-
● The most reliable way to back up all Salesforce data and attachments monthly is by scheduling a Data Export job.
● This job can be set to run weekly or monthly to automate full backups.
● It generates compressed .zip files containing CSVs of each object’s data and attachments.
● This ensures recovery options are available in case of data loss.
Source: https://help.salesforce.com/s/articleView?id=sf.data_export_overview.htm

What can be used to override the Account’s standard Edit button for Lightning Experience?

⬜ A. Lightning action
✅ B. Lightning component
⬜ C. Lightning page
⬜ D. Lightning flow

Explanation:-
● A Lightning Component can override the standard Edit button in Lightning Experience.
● Allows customizing the user experience with custom forms and navigation.
● Provides flexibility beyond standard edit layouts.
Source: https://developer.salesforce.com/docs/component-library/documentation/en/lwc/lwc.use_overrides

When using SalesforceDX, what does a developer need to enable to create and manage scratch orgs?

⬜ A. Production
✅ B. Dev Hub
⬜ C. Environment Hub
⬜ D. Sandbox

Explanation:-
● Scratch orgs are created and managed only when Dev Hub is enabled.
● Dev Hub is a special type of Salesforce org for source-driven development.
● Provides centralized management of scratch orgs.
Source: https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_scratch_orgs.htm

Which three statements are accurate about debug logs? (Choose 3 answers)

⬜ A. Debug log levels are cumulative, where FINE includes DEBUG, INFO, WARN, and ERROR
⬜ B. The maximum size of a debug log is 5 MB
✅ C. Only the 20 most recent debug logs for a user are kept
✅ D. Debug logs can be set for specific users, classes, and triggers
✅ E. System debug logs are retained for 24 hours

Explanation:-
● Salesforce keeps only the 20 most recent logs per user.
● Logs can be configured for specific users, triggers, or Apex classes.
● Logs are retained for 24 hours.
Source: https://help.salesforce.com/s/articleView?id=sf.code_debug_log.htm

Universal Containers implemented a private sharing model for the Account object. A custom Account search tool was developed with Apex to help sales representatives find accounts that match multiple criteria they specify. Since its release, users of the tool report they can see Accounts they do not own. What should the developer use to enforce sharing permission for the currently logged-in user while using the custom search tool?

⬜ A. Use the schema describe calls to determine if the logged-in user has access to the Account object
⬜ B. Use the without sharing keyword on the class declaration
⬜ C. Use the UserInfo Apex class to filter queries by user ownership
✅ D. Use the with sharing keyword on the class declaration

Explanation:-
● The with sharing keyword ensures that Apex code respects record-level, object-level, and field-level security.
● Prevents Apex from returning records that the user cannot access.
● Essential in private sharing models.
Source: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_keywords_sharing.htm

What are two use cases for executing Anonymous Apex code? (Choose 2 answers)

⬜ A. To delete 15,000 inactive Accounts in a single transaction after a deployment
✅ B. To schedule an Apex class to run periodically
✅ C. To run a batch Apex class to update all Contacts
⬜ D. To add unit test code coverage to an org

Explanation:-
● Anonymous Apex is useful for running code snippets without creating a permanent class.
● It can schedule Apex classes or execute Batch Apex directly from Developer Console or VS Code.
● It cannot add code coverage or bypass transaction limits for mass deletions.
Source: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_execute_anonymous.htm

A custom Visualforce controller calls the ApexPages.addMessage() method, but no messages are rendering on the page. Which component should be added to the Visualforce page to display the message?

✅ A. <apex:pageMessages />
⬜ B. <apex:pageMessage severity="info"/>
⬜ C. <apex:facet name="message"/>
⬜ D. <apex:message for="info"/>

Explanation:-
<apex:pageMessages /> is required to display messages added using ApexPages.addMessage().
● It renders all messages for the page, including errors, warnings, and info.
<apex:message> is used for a specific field, not page-level messages.
Source: https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_compref_pageMessages.htm

When importing and exporting data into Salesforce, which two statements are true? (Choose 2 answers)

⬜ A. Bulk API can be used to import large data volumes in development environments without bypassing storage limits
⬜ B. Bulk API can be used to bypass storage limits when importing large data volumes
✅ C. Developer and Developer Pro sandboxes have different storage limits
✅ D. Data Import Wizard is a client application provided by Salesforce

Explanation:-
● Developer sandboxes provide 200 MB, Developer Pro sandboxes provide 1 GB.
● Data Import Wizard is a client app built into Salesforce Setup.
● Bulk API does not bypass storage limits; those are enforced regardless.
Source: https://help.salesforce.com/s/articleView?id=sf.data_import_wizard.htm

Where are two locations a developer can look to find information about the status of asynchronous or future methods? (Choose 2 answers)

✅ A. Apex Flex Queue
✅ B. Apex Jobs
⬜ C. Paused Flow Interviews component
⬜ D. Time-Based Workflow Monitor

Explanation:-
● Apex Flex Queue tracks batch jobs waiting to be processed.
● Apex Jobs monitor the execution status of asynchronous calls including @future and Queueable jobs.
● Paused Flow Interviews and Time-Based Workflow are unrelated to async Apex methods.
Source: https://help.salesforce.com/s/articleView?id=sf.code_async_overview.htm

Cloud Kicks Fitness, an ISV Salesforce partner, is developing a managed package application. One of the application modules allows the user to calculate body fat using the Apex class BodyFat and its method calculateBodyFat(). The product owner wants to ensure this method is accessible by consumers of the package outside the ISV namespace. Which approach should a developer take?

⬜ A. Declare the class and method using the public access modifier
⬜ B. Declare the class as global and use the public access modifier on the method
⬜ C. Declare the class as public and use the global access modifier on the method
✅ D. Declare the class and method using the global access modifier

Explanation:-
● In managed packages, only global allows access to classes/methods outside the package namespace.
● public restricts visibility to the namespace only.
● Both class and method must be declared as global for external access.
Source: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_access_modifiers.htm

Since Aura application events follow the traditional publish-subscribe model, which method is used to fire an event?

⬜ A. emit()
⬜ B. fireEvent()
✅ C. fire()
⬜ D. registerEvent()

Explanation:-
● In Aura components, event.fire() is the method used to publish an application event.
registerEvent() is for declaring component events, not firing.
emit() and fireEvent() are not valid Aura methods.
Source: https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/events_intro.htm

A developer wants to mark each Account in a List as Active or Inactive based on the LastModifiedDate being more than 90 days. Which Apex technique should the developer use?

⬜ A. A for loop, with a switch statement inside
⬜ B. A switch statement, with a for loop inside
⬜ C. An if/else statement, with a for loop inside
✅ D. A for loop, with an if/else statement inside

Explanation:-
● Iteration must check each record individually.
● A simple for loop with an if/else condition is the most efficient way to mark active/inactive.
● Apex switch statements are not appropriate for date comparisons.
Source: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/langCon_apex_loops.htm

What are three characteristics of change set deployments? (Choose 3 answers)

✅ A. Change sets can only be used between related organizations
⬜ B. Change sets can be used to transfer records
✅ C. Sending a change set between two orgs requires a deployment connection
✅ D. Change sets can deploy custom settings data
⬜ E. Deployment is done in a one-way, single transaction

Explanation:-
● Change sets only work between connected Salesforce orgs (production ↔ sandbox).
● Deployment requires a deployment connection between orgs.
● Change sets support metadata including custom settings data, but not records.
● Deployment transactions can contain multiple steps, not always one-way single transaction.
Source: https://help.salesforce.com/s/articleView?id=sf.changesets.htm

A developer must create a DrawList class that provides capabilities defined in the Sortable and Drawable interfaces:
public interface Sortable { void sort(); }  
public interface Drawable { void draw(); }

Which is the correct implementation?

⬜ A. public class DrawList implements Sortable, implements Drawable { ... }
⬜ B. public class DrawList extends Sortable, Drawable { ... }
✅ C. public class DrawList implements Sortable, Drawable { public void sort(){} public void draw(){} }
⬜ D. public class DrawList extends Sortable, extends Drawable { ... }

Explanation:-
● A class can implement multiple interfaces using the implements keyword separated by commas.
● The correct implementation is option C, implementing both Sortable and Drawable.
● extends is only used for class inheritance, not for interfaces.
Source: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_interfaces.htm

A team of developers is working on a source-driven project that allows them to work independently, with many different org configurations. Which type of Salesforce orgs should they use for their development?

⬜ A. Developer sandboxes
✅ B. Scratch orgs
⬜ C. Full Copy sandboxes
⬜ D. Developer orgs

Explanation:-
● Scratch orgs are temporary, source-driven, and support independent developer environments.
● They allow developers to configure, test, and destroy quickly.
● Sandboxes and developer orgs are persistent and not designed for fast source-driven development.
Source: https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_scr_orgs.htm

A developer created a Lightning web component called statusComponent to be inserted into the Account record page. Which two things should the developer do to make the component available? (Choose 2 answers)

✅ A. Add <isExposed>true</isExposed> to the statusComponent.js-meta.xml file
✅ B. Add <target>lightning__RecordPage</target> to the statusComponent.js-meta.xml file
⬜ C. Add <masterLabel>Account</masterLabel> to the statusComponent.js-meta.xml file
⬜ D. Add <target>Lightning_RecordPage</target> to the statusComponent.js file

Explanation:-
● To expose a Lightning Web Component to record pages, the metadata file (.js-meta.xml) must include <isExposed> and a <target>.
● The correct target for record pages is lightning__RecordPage.
● masterLabel is not required for availability, and targets must be set in the XML file, not JS file.
Source: https://developer.salesforce.com/docs/component-library/documentation/en/lwc/lwc.reference_configuration_tags

A developer is migrating a Visualforce page into a Lightning Web Component. The Visualforce page shows information about a single record. The developer decides to use Lightning Data Service (LDS) to access record data. Which security consideration should the developer be aware of?

✅ A. Lightning Data Service handles sharing rules and field-level security
⬜ B. Lightning Data Service ignores field-level security
⬜ C. The with sharing keyword must be used to enforce sharing rules
⬜ D. The isAccessible() method must be used for field-level access checks

Explanation:-
● Lightning Data Service automatically enforces field-level security (FLS) and sharing rules.
● Developers don’t need to manually add isAccessible() or with sharing for LDS-based record retrieval.
● This makes LDS more secure and consistent with platform enforcement.
Source: https://developer.salesforce.com/docs/component-library/documentation/en/lwc/lwc.reference_lds_security

A developer has the following requirements:
• Calculate the total amount on an Order.
• Calculate the line amount for each Line Item based on quantity and price.
• Move Line Items to a different Order if a Line Item is not in stock.

Which relationship implementation supports these requirements on its own?

✅ A. Line Item has a re-parentable master-detail field to Order
⬜ B. Order has a re-parentable master-detail field to Line Item
⬜ C. Line Item has a re-parentable lookup field to Order
⬜ D. Order has a re-parentable lookup field to Line Item

Explanation:-
● A re-parentable master-detail relationship allows child records (Line Items) to be reassigned to a different parent (Order).
● This enables roll-up summary calculations for totals.
● Lookup relationships don’t provide roll-up summaries.
Source: https://help.salesforce.com/s/articleView?id=sf.relationships_considerations.htm

A developer created a child Lightning web component nested inside a parent Lightning web component. The parent component needs to pass a string value to the child component. In which two ways can this be accomplished? (Choose 2 answers)

✅ A. The parent component can use a custom event to pass the data to the child component
⬜ B. The parent component can use the Apex controller class to send data to the child component
⬜ C. The parent component can invoke a method in the child component
✅ D. The parent component can use a public property to pass the data to the child component

Explanation:-
● Data binding is best achieved using public (@api) properties in the child LWC.
● Parent-to-child communication can also be achieved via events and property passing.
● Apex controllers are used for server-side logic, not component communication.
● Invoking methods directly is not the standard mechanism for parent-to-child.
Source: https://developer.salesforce.com/docs/component-library/documentation/en/lwc/lwc.events_parent_to_child

What should a developer do to check the code coverage of a class after running all tests?

⬜ A. View the Code Coverage column in the list view on the Apex Classes page
✅ B. View the Class Test Percentage tab on the Apex Class list view in Salesforce Setup
⬜ C. View the Overall Code Coverage panel in the Developer Console Tests tab
⬜ D. Select and run the class on the Apex Test Execution page in the Developer Console

Explanation:-
● After running all tests, class-level code coverage can be viewed in the Apex Classes page under Salesforce Setup.
● The “Class Test Percentage” column shows coverage specific to each class.
● Developer Console displays overall coverage but not detailed per-class values like Setup does.
Source: https://help.salesforce.com/s/articleView?id=sf.code_test_coverage.htm

How should a developer write unit tests for a private method in an Apex class?

⬜ A. Use the SeeAllData annotation
⬜ B. Add a test method in the Apex class
✅ C. Use the @TestVisible annotation
⬜ D. Mark the Apex class as global

Explanation:-
@TestVisible allows private variables and methods to be accessed in test classes.
● This ensures encapsulation is preserved while still supporting test coverage.
● Making classes global or using SeeAllData does not address private method testing.
Source: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_annotation_testvisible.htm

What are three capabilities of the <ltng:require> tag when loading JavaScript resources in Aura components? (Choose 3 answers)

⬜ A. Loading files from Documents
✅ B. One-time loading for duplicate scripts
✅ C. Specifying loading order
✅ D. Loading scripts in parallel
⬜ E. Loading externally hosted scripts

Explanation:-
<ltng:require> ensures scripts are loaded once and prevents duplicate loading.
● Developers can specify load order for dependent scripts.
● Supports parallel script loading for efficiency.
● Cannot directly load from Documents or external servers — static resources must be used.
Source: https://developer.salesforce.com/docs/component-library/documentation/en/lwc/lwc.reference_ltng_require

An org has an existing Flow that creates an Opportunity with an Update Records element. A developer updates the Flow to also create a Contact and store the created Contact’s ID on the Opportunity. Which update should the developer make in the Flow?

⬜ A. Add a new Get Records element
⬜ B. Add a new Update Records element
⬜ C. Add a new Quick Action element (of type Create)
✅ D. Add a new Create Records element

Explanation:-
● To create a new Contact within the Flow, a “Create Records” element must be added.
● This element generates the Contact and allows storing its Id into a variable, which can then be referenced in the Opportunity update.
● Update or Get Records cannot create new records.
Source: https://help.salesforce.com/s/articleView?id=sf.flow_ref_elements_create.htm

Which three resources in an Aura Component can contain JavaScript functions? (Choose 3 answers)

✅ A. Controllers
✅ B. Helper
⬜ C. Design
⬜ D. Style
✅ E. Renderer

Explanation:-
● JavaScript functions in Aura can be defined in the controller, helper, and renderer files.
● Design files configure component properties in Lightning App Builder, not JS logic.
● Style files contain CSS, not JavaScript.
Source: https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/js_cb_controller_helper.htm

A custom picklist field, Food_Preference__c, exists on a custom object. The picklist contains: Vegan, Kosher, No Preference. The developer must ensure a value is always populated every time a record is created or updated. What is the most efficient way to ensure a value is selected?

⬜ A. Set “Use the first value in the list as the default value” as True
⬜ B. Set a validation rule to enforce a value is selected
✅ C. Mark the field as Required on the field definition
⬜ D. Mark the field as Required on the object’s page layout

Explanation:-
● Making the field Required at the field level ensures enforcement across all layouts, APIs, and imports.
● Page layout “Required” only applies in UI, not APIs.
● Validation rules add unnecessary complexity when the field-level required option exists.
Source: https://help.salesforce.com/s/articleView?id=sf.fields_about_field_definitions.htm

Universal Containers wants to lower shipping costs while making the shipping process more efficient. They decide to implement global addresses so multiple Accounts can share a default pickup address. The developer creates a custom object “Global Address”. Which field should the developer add for the most efficient model?

⬜ A. Add a Master-Detail field on the Account object to the Global Address object
✅ B. Add a Master-Detail field on the Global Address object to the Account object
⬜ C. Add a Lookup field on the Account object to the Global Address object
⬜ D. Add a Lookup field on the Global Address object to the Account object

Explanation:-
● A Master-Detail on Global Address → Account ensures one address record can be shared across multiple Accounts.
● This supports ownership and roll-up behaviors efficiently.
● Lookup would work but wouldn’t provide the same tight relationship control.
Source: https://help.salesforce.com/s/articleView?id=sf.relationships_considerations.htm

What are three considerations when using the @InvocableMethod annotation in Apex? (Choose 3 answers)

⬜ A. A method using @InvocableMethod must define a return value
⬜ B. A method using @InvocableMethod can have multiple input parameters
✅ C. A method using @InvocableMethod must be declared as static
✅ D. A method using @InvocableMethod can be declared as Public or Global
✅ E. Only one method using @InvocableMethod can be defined per Apex class

Explanation:-
@InvocableMethod enables calling Apex methods from Process Builder and Flows.
● Methods must be static and can only accept one parameter of a list type.
● Multiple invocable methods per class are not allowed.
● Access modifiers allowed: public or global.
Source: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_annotation_invocablemethod.htm

Which statement is true regarding execution order when triggers are associated to the same object and event?

✅ A. Trigger execution order cannot be guaranteed
⬜ B. Triggers are executed in the order they are modified
⬜ C. Triggers are executed alphabetically by trigger name
⬜ D. Triggers are executed in the order they are created

Explanation:-
● Salesforce does not guarantee the order of execution when multiple triggers exist for the same object and event.
● Best practice: consolidate logic into a single trigger per object.
● Alphabetical order, creation date, or modification date do not control trigger execution sequence.
Source: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_triggers_bestpract.htm

A developer migrated functionality from JavaScript Remoting to a Lightning web component and wants to use the existing getOpportunities() method to provide data. What to do now?

✅ A. The method must be decorated with (cacheable=true).
⬜ B. The method must be decorated with @AuraEnabled.
⬜ C. The method must return a JSON Object.
⬜ D. The method must return a String of a serialized JSON Array.

Explanation:-
● LWC wire adapters that call Apex require the Apex method to be annotated with @AuraEnabled and, if the result should be cached and reactive, with (cacheable=true).
● This ensures the data can be returned without re-fetching when not changed.
● Returning JSON is unnecessary; Apex methods return strongly typed objects that LWC can handle.
Source: https://developer.salesforce.com/docs/component-library/documentation/en/lwc/lwc.apex

A Lightning component has a wired property, searchResults, that stores a list of Opportunities. Which definition of the Apex method should be used?

✅ A.

@AuraEnabled(cacheable=true) 
public static List<Opportunity> search(String term) { /* implementation*/ }

⬜ B.

@AuraEnabled(cacheable=true) 
public List<Opportunity> search(String term) { /*implementation*/ }  

⬜ C.

@AuraEnabled(cacheable=false) 
public static List<Opportunity> search(String term) { /*implementation*/ }  

⬜ D.

@AuraEnabled(cacheable=false) 
public List<Opportunity> search(String term) { /*implementation*/ }  

Explanation:-
● Methods wired to properties in LWC must be static and annotated with @AuraEnabled(cacheable=true).
● This allows data to be cached and reactive to changes.
● Non-static methods or cacheable=false are not valid for wired properties.
Source: https://developer.salesforce.com/docs/component-library/documentation/en/lwc/lwc.apex_wire_method

Management asked for opportunities to be automatically created for accounts with annual revenue greater than $1,000,000. Data Loader upload fails with exceptions. Which two actions should the developer take?

⬜ A. Check if all the required fields for Opportunity are being added on creation.
⬜ B. Use Database.query to query the opportunities.
✅ C. Move the DML that saves opportunities outside the for loop.
✅ D. Query for existing opportunities outside the for loop.

Explanation:-
● Performing DML inside a loop causes governor limit errors when bulk data is processed (e.g., Data Loader).
● The fix is to collect records and perform DML once outside the loop.
● Similarly, queries should be moved outside loops to avoid SOQL governor limit violations.
Source: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_dml_bulk.htm

What are two ways a developer can get the status of an enqueued job for a class that implements the Queueable interface? (Choose 2 answers)

⬜ A. View the Apex status Page
✅ B. View the Apex Flex Queue
⬜ C. View the Apex Jobs page
✅ D. Query the AsyncApexJob object

Explanation:-
● Queueable jobs are tracked as async jobs. Developers can monitor them by querying the AsyncApexJob object.
● The Apex Flex Queue lets you see and manage queued batch and queueable jobs.
● The Apex Jobs page shows batch/scheduled jobs but not the enqueued Queueable status directly.
Source: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_queueing_jobs.htm

Cloud Kicks has a multi-screen flow. At one step, agents should see real-time order data from an external system. What should a developer use?

⬜ A. An Apex controller
✅ B. An Apex REST class
⬜ C. An outbound message
⬜ D. An invocable method

Explanation:-
● Real-time integration requires exposing Salesforce to external calls or calling out.
● An Apex REST class allows the external order management system to provide live data to the flow.
● Outbound messages and invocable methods do not support direct real-time retrieval.
Source: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_rest_intro.htm

A developer needs records with specific field values in order to test a new Apex class. What should the developer do?

⬜ A. Use Anonymous Apex to create the required data.
✅ B. Use Test.loadData() and reference a CSV file in a static resource.
⬜ C. Use SOQL to query the org for the required data.
⬜ D. Use Test.loadData() and reference a JSON file in Documents.

Explanation:-
● Unit tests must create their own test data.
● Test.loadData() is a standard approach, allowing loading of CSV data from static resources.
● Querying org data violates isolation best practices; Anonymous Apex cannot be relied upon.
Source: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_testing_data.htm

How can a developer check the test coverage of active Process Builder and Flows before deploying them in a Change Set?

⬜ A. Use the Flow properties page.
⬜ B. Use the Code Coverage Setup page.
⬜ C. Use the Apex testresult class.
✅ D. Use SOQL and the Tooling API.

Explanation:-
● Flows and Process Builders do not directly expose coverage in Setup.
● Developers use the Tooling API and SOQL queries against code coverage and metadata objects to measure them before deployment.
● The Apex testresult class only works for Apex tests.
Source: https://developer.salesforce.com/docs/atlas.en-us.api_tooling.meta/api_tooling/intro_coverage_tooling_api.htm

Universal Containers has Visualforce pages built with third-party JavaScript. They want to apply Lightning styling quickly. What should the developer do?

✅ A. Incorporate the Salesforce Lightning Design System CSS stylesheet.
⬜ B. Rewrite all Visualforce pages as Lightning components.
⬜ C. Set enableLightning=true in the definition.
⬜ D. Enable ‘Available for Lightning Experience’ on Visualforce pages.

Explanation:-
● The quickest way is to include Salesforce Lightning Design System (SLDS) CSS.
● SLDS provides Lightning-styled components that can be added to existing Visualforce without rewriting.
● Rewriting all pages is time-consuming and unnecessary for styling alone.
Source: https://www.lightningdesignsystem.com/

Which two are best practices for component and application event handling? (Choose 2 answers)

✅ A. Reuse the event logic in a helper.
⬜ B. Use component events for actions handled at application level.
✅ C. Handle low-level events and re-fire them as higher-level events.
⬜ D. Prefer application events over component events.

Explanation:-
● Code reuse is promoted by placing event logic in helpers.
● A good practice is to handle low-level events locally and then raise higher-level events for parent or app scope.
● Application events should be minimized because they are expensive and harder to debug.
Source: https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/events_best_practices.htm

A developer wrote Apex code that calls out to an external system. How should a developer write the test to provide coverage?

⬜ A. Write a class that extends HTTPCalloutMock.
✅ B. Write a class that implements the HTTPCalloutMock interface.
⬜ C. Write a class that implements the WebserviceMock interface.
⬜ D. Write a class that extends WebserviceMock.

Explanation:-
● HTTP callouts in tests must be mocked.
● The HTTPCalloutMock interface lets developers simulate callout responses.
● Implementing this interface allows test classes to run without making real HTTP requests.
Source: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_restful_http_testing.htm

Universal Containers needs Opportunity data sent via HTTP REST callout from Lightning Experience. Which two methods should the developer implement? (Choose 2 answers)

✅ A. Create a Lightning component with REST callout and expose via Lightning Action.
⬜ B. Create a Process Builder with Apex action for the callout.
⬜ C. Create an after update trigger with a @Future(callout=true) method.
✅ D. Create a Visualforce page with REST callout and expose via Quick Action.

Explanation:-
● User-initiated actions in Lightning Experience can call Apex via a Lightning Action that performs REST callouts.
● Visualforce Quick Actions also allow embedding callouts behind user actions.
● Process Builder cannot directly perform callouts without Apex.
● Triggers with @future are not recommended for user-initiated synchronous callouts.
Source: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_callouts.htm

A developer wants to invoke an outbound message when a record meets criteria. Which three features satisfy this use case? (Choose 3 answers)

✅ A. Approval Process can send outbound message without Apex.
✅ B. Process Builder can send outbound message with Apex.
✅ C. Workflow can send outbound message.
⬜ D. Process Builder can send outbound message without Apex.
⬜ E. Visual Workflow can send outbound message without Apex.

Explanation:-
● Outbound messages can be configured in Workflow Rules and Approval Processes directly.
● Process Builder can also trigger an Apex action that performs outbound call logic.
● Process Builder alone (without Apex) and Flow do not provide direct outbound message functionality.
Source: https://help.salesforce.com/s/articleView?id=sf.workflow_about.htm

Given an Anonymous Block operating on 10,000 Case records, what should a developer consider?

✅ A. The transaction will fail due to exceeding governor limits.
⬜ B. The try/catch block will handle any DML exceptions thrown.
⬜ C. The transaction will succeed and changes will be committed.
⬜ D. The try/catch block will handle exceptions from governor limits.

Explanation:-
● Apex has strict governor limits (e.g., max 150 DML statements, 10,000 rows per DML).
● Operating on 10,000 Case records in a single transaction without bulkification will exceed limits and fail.
● Governor limit violations are not catchable by try/catch.
Source: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_gov_limits.htm

For which three items can a trace flag be configured? (Choose 3 answers)

⬜ A. Process Builder
⬜ B. Visualforce
✅ C. Apex Class
✅ D. Apex Trigger
✅ E. User

Explanation:-
● Trace flags allow capturing debug logs for specific users, classes, and triggers.
● They cannot be set on Process Builder or Visualforce directly.
● This helps isolate execution contexts for debugging.
Source: https://help.salesforce.com/s/articleView?id=sf.code_setting_debug_log.htm

A developer has a single custom controller for a Visualforce Wizard. Which three statements are useful in unit tests? (Choose 3 answers)

⬜ A. insert pageRef.
✅ B. Test.setCurrentPage(pageRef);
⬜ C. public ExtendedController(ApexPages StandardController cntrl) { }
✅ D. ApexPages.CurrentPage().getParameters().put(‘input’, ‘TestValue’);
✅ E. String nextPage = controller.save().getUrl();

Explanation:-
● Unit tests for Visualforce controllers must simulate page context using Test.setCurrentPage().
● Parameters can be injected using ApexPages.CurrentPage().getParameters().put().
● Verifying navigation flow with controller.save().getUrl() ensures the wizard behaves correctly.
Source: https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_controller_error_handling.htm

A developer is creating an app with multiple LWCs. One child component is for navigation. How should the parent know when to navigate?

⬜ A. Fire a notification.
⬜ B. Update a property on the parent.
⬜ C. Call a method in the Apex controller.
✅ D. Create a custom event.

Explanation:-
● In LWC, child-to-parent communication is achieved using custom events.
● The child dispatches a custom event, and the parent listens and handles navigation logic.
Source: https://developer.salesforce.com/docs/component-library/documentation/en/lwc/lwc.events_create_dispatch

A developer is implementing an Apex class for a financial system. Variables should not change once assigned. In which two ways can they be declared? (Choose 2 answers)

⬜ A. Use static keyword and assign in constructor.
✅ B. Use final keyword and assign in constructor.
⬜ C. Use static keyword and assign in static initializer.
✅ D. Use final keyword and assign at declaration.

Explanation:-
● The final keyword enforces immutability for variables.
● Values can be assigned once either in the constructor or at declaration.
● Static keyword does not guarantee immutability.
Source: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/langCon_apex_variables.htm

If Apex code executes inside execute() of a Batchable class, which statements are true regarding governor limits? (Choose 2 answers)

⬜ A. Limits might be higher due to async.
✅ B. Limits reset for each iteration of execute().
✅ C. Limits are relaxed while calling constructor.
⬜ D. Limits cannot be exceeded due to async.

Explanation:-
● Each execution of the execute() method runs in its own context, so limits reset each time.
● Constructors are invoked once per batch job and also have a fresh set of limits.
● Async execution does not increase governor limits beyond standard values.
Source: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_batch_interface.htm

A developer is integrating with a legacy SQL database. What should be used to ensure integrated data matches correct Salesforce records?

⬜ A. Lookup field
✅ B. External ID field
⬜ C. Formula field
⬜ D. External Object

Explanation:-
● External IDs uniquely identify records for integration.
● They allow upserts and matching from external systems to Salesforce records.
● Lookup fields and formula fields cannot enforce external matching.
Source: https://help.salesforce.com/s/articleView?id=sf.fields_external_id.htm

A developer created a custom order management app with Order and OrderItem (master-detail). Orders can be split. What should be done to move OrderItems to a new Order?

⬜ A. Change master-detail to external lookup.
⬜ B. Add without sharing to the class.
✅ C. Create a junction object between OrderItem and Order.
⬜ D. Select Allow reparenting on master-detail.

Explanation:-
● Since OrderItem has a strict master-detail to Order, reparenting is not possible by default.
● Introducing a junction object allows flexible association of OrderItems with multiple Orders.
● Simply enabling reparenting is not sufficient for this business case.
Source: https://developer.salesforce.com/docs/atlas.en-us.api.meta/api relationships_concepts.htm

A developer observes that an Apex test method fails in the Sandbox. To identify the issue, the developer copies the code inside the test method and executes it via the Execute Anonymous tool in the Developer Console. The code then executes with no exceptions or errors. Why did the test method fail in the sandbox and pass in the Developer Console?

⬜ A. The test method has a syntax error in the code.
✅ B. The test method relies on existing data in the sandbox.
⬜ C. The test method is calling an @future method.
⬜ D. The test method does not use System.runAs to execute as a specific user.

Explanation:-
● Test methods execute in an isolated context and cannot rely on existing data unless annotated with @isTest(SeeAllData=true).
● Execute Anonymous uses real org data, so the same code may pass there but fail in test context.
● This ensures test predictability and independence from sandbox data.
Source: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_testing_isolation_of_test_data.htm

Which Apex class contains methods to return the amount of resources that have been used for a particular governor, such as the number of DML statements?

⬜ A. Exception
⬜ B. Messaging
⬜ C. OrgLimits
✅ D. Limits

Explanation:-
● The Limits class provides methods like getDMLStatements() and getQueries() to check governor usage.
● Useful for debugging bulkification and governor issues.
● Other classes like Exception or Messaging do not provide governor limit metrics.
Source: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_limits.htm

A company has been adding data to Salesforce and has not done a good job of limiting the creation of duplicate Lead records. The developer is considering writing an Apex process to identify duplicates and merge the records together. Which two statements are valid considerations when using merge? (Choose 2 answers)

⬜ A. The field values on the master record are overwritten by the records being merged.
✅ B. Merge is supported with accounts, contacts, cases, and leads.
⬜ C. External ID fields can be used with the merge method.
✅ D. The merge method allows up to three records, including the master and two additional records with the same sObject type, to be merged into the master record.

Explanation:-
● Merge supports Accounts, Contacts, and Leads; Cases cannot be merged.
● You can merge up to three records (master + two others) of the same sObject type.
● Master field values are retained unless explicitly overwritten, not replaced automatically.
Source: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_dml_merge.htm

A business has a proprietary Order Management System (OMS)… Which two actions will prevent the duplicate order records from being created in Salesforce? (Choose 2 answers)

✅ A. Ensure that the order number in the OMS is unique.
⬜ B. Use the order number from the OMS as an external ID.
⬜ C. Use the email on the contact record as an external ID.
✅ D. Write a before trigger on the order object to delete any duplicates.

Explanation:-
● Ensuring unique order numbers in the OMS provides a reliable unique identifier.
● Marking this field as External ID in Salesforce allows upserts instead of inserts, preventing duplicates.
● Using email as external ID is unreliable as multiple contacts may share an email.
● A trigger to delete duplicates is not best practice compared to external ID constraints.
Source: https://help.salesforce.com/s/articleView?id=sf.fields_external_id.htm

Which two statements are true about using the @testSetup annotation in an Apex test class? (Choose 2 answers)

⬜ A. Records created in the test setup method cannot be updated in individual test methods.
✅ B. The @testSetup annotation is not supported when the @isTest(SeeAllData=True) annotation is used.
⬜ C. Test data is inserted once for all test methods in a class.
✅ D. A method defined with the @testSetup annotation executes once for each test method in the test class and counts towards system limits.

Explanation:-
● @testSetup methods create common test data available for all test methods in a class.
● They run once per class, not per test method, helping reduce data creation overhead.
● They are not supported with SeeAllData=true.
Source: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_testing_testsetup_using.htm

A primaryid__c custom field exists on the Candidate__c custom object. The field is used to store each candidate’s id number and is marked as Unique in the schema definition. Universal Containers wants to upload a CSV with updates to existing candidates. Which technique should the developer implement to streamline the data upload?

⬜ A. Create a Process Builder on the Candidate__c object to map the records.
⬜ B. Create a before Insert trigger to correctly map the records.
✅ C. Update the primaryid__c field definition to mark it as an External Id.
⬜ D. Upload the CSV into a custom object related to Candidate__c.

Explanation:-
● Marking primaryid__c as an External ID ensures that data imports can perform upserts, matching rows in the CSV to existing records.
● This avoids duplicates and streamlines updates.
● Process Builder or triggers are not required just for mapping external IDs.
Source: https://help.salesforce.com/s/articleView?id=sf.fields_external_id.htm

A custom object Trainer__c has a lookup field to another custom object Gym__c. Which SOQL query will get the record for the Viridian City gym and its trainers?

✅ A. SELECT Id, (SELECT Id FROM Trainers) FROM Gym__c WHERE Name = ‘Viridian City Gym’
⬜ B. SELECT Id, (SELECT Id FROM Trainer__c) FROM Gym__c WHERE Name = ‘Viridian City Gym’
⬜ C. SELECT Id FROM Trainer__c WHERE Gym__r.Name = ‘Viridian City Gym’
⬜ D. SELECT Id, (SELECT Id FROM Trainers) FROM Gym__c WHERE Name = ‘Viridian City Gym’

Explanation:-
● A parent-child relationship query uses a nested SELECT for the child records.
● The correct relationship name must be used (child relationship name on the lookup).
● In this example, Trainers is the child relationship name defined on Gym__c.
Source: https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_relationships.htm

What are two ways for a developer to execute tests in an org?

✅ A. Tooling API
✅ B. Developer Console
⬜ C. Bulk API
⬜ D. Metadata API

Explanation:-
● Developers can run tests using the Developer Console UI.
● The Tooling API provides endpoints to run and query test results programmatically.
● Bulk API and Metadata API do not support executing Apex tests.
Source: https://developer.salesforce.com/docs/atlas.en-us.api_tooling.meta/api_tooling/intro_coverage_tooling_api.htm

A software company uses Case, Defect__c (custom), and Case_Defect__c (junction). What should be done to share a specific Case_Defect__c record with a user?

⬜ A. Share the Case_Defect__c record.
⬜ B. Share the parent Case record.
⬜ C. Share the parent Defect__c record.
✅ D. Share the parent Case and Defect__c records.

Explanation:-
● Junction object access depends on access to both parent records.
● Sharing only the junction object does not provide access if the user lacks access to Case or Defect__c.
● Thus, both parent records must be shared.
Source: https://help.salesforce.com/s/articleView?id=sf.security_sharing_records.htm

An Opportunity needs to have an amount rolled up from a custom object that is not in a master-detail relationship. How can this be achieved?

⬜ A. Write a trigger on the child object and use a red-black tree sorting to sum amounts.
⬜ B. Write a Process Builder that links the custom object to the Opportunity.
✅ C. Write a trigger on the child object and use an aggregate function to sum the amount.
⬜ D. Use the Streaming API to create real-time roll-up summaries.

Explanation:-
● When master-detail is not available, roll-ups must be simulated with triggers.
● An aggregate SOQL query can calculate sums of related records and update the Opportunity.
● Process Builder and Streaming API do not provide this roll-up capability.
Source: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_triggers.htm

A developer must create a lightning component that allows users to input contact record information to create a contact record, including a salary__c custom field. What should the developer use so that salary__c functions as currency and respects field-level security?

✅ A.
⬜ B.
⬜ C.
⬜ D.

Explanation:-
tied to lightning-record-edit-form respects field-level security automatically.
● It enforces currency formatting and ensures only authorized users can view/edit the field.
● Other tags like or do not enforce FLS automatically.
Source: https://developer.salesforce.com/docs/component-library/bundle/lightning-input-field/documentation

A developer is tasked to perform a security review of the ContactSearch Apex class. The method concatenates user input into SOQL. What are two ways to prevent a SOQL injection attack? (Choose 2 answers)

✅ A. Use variable binding and replace the dynamic query with a static SOQL.
✅ B. Use the escapeSingleQuote method to sanitize the parameter before its use.
⬜ C. Use a regular expression on the parameter to remove special characters.
⬜ D. Use the @ReadOnly annotation and the with sharing keyword on the class.

Explanation:-
● Always use bind variables in SOQL to avoid injection.
● escapeSingleQuote() sanitizes strings when concatenation is necessary.
● Regular expressions are not the recommended pattern.
● With sharing/@ReadOnly do not prevent SOQL injection.
Source: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_dynamic_soql.htm

A developer created three Rollup Summary fields in Project__c. They need a ratio between rejected and approved timesheets. Which should the developer use to minimize maintenance?

⬜ A. Record-triggered Flow
✅ B. Formula field
⬜ C. Apex Trigger
⬜ D. Process Builder

Explanation:-
● Formula fields are ideal for calculations based on existing roll-up summary fields.
● They minimize maintenance as they recalculate automatically.
● Triggers or Flows would introduce unnecessary complexity.
Source: https://help.salesforce.com/s/articleView?id=sf.fields_about_calculated_fields.htm

*Which three Salesforce resources can be accessed from a Lightning web component? (Choose 3 answers)

✅ A. SVG resources
⬜ B. Third-party web components
✅ C. Content asset files
✅ D. Static resources
⬜ E. All external libraries

Explanation:-
You can import these Salesforce resources from a Lightning web component’s JavaScript file:-
● Static Resources
● Content Asset Files
● SVG Resources
● Labels
● Internationalization
● Current User ID
● Current Community
● Permissions
● Client Form Factor
Source: https://developer.salesforce.com/docs/platform/lwc/guide/create-global-value-providers.html

An org tracks Orders and Line Items. Line Item has a Master-Detail to Order. The requirement is to calculate line amount (quantity*price) and roll up to order. What is the correct implementation?

✅ A. Line amount as formula field, Order amount as roll-up summary.
⬜ B. Trigger on Line Item to calculate both.
⬜ C. Line amount as currency, Order amount as SUM formula.
⬜ D. Process on Line Item to update both.

Explanation:-
● Best practice: use formula field on Line Item to calculate line amount.
● Then use a roll-up summary on Order to aggregate values.
● Roll-up summaries only work with Master-Detail relationships.
Source: https://help.salesforce.com/s/articleView?id=sf.fields_about_roll_up_summary_fields.htm

Which action may cause triggers to fire?

✅ A. Updates to Feed Items
⬜ B. Renaming or replacing a picklist entry
⬜ C. Changing a user’s default division
⬜ D. Cascading delete operations

Explanation:-
● DML operations on records, such as Feed Items, fire triggers.
● Metadata changes like renaming picklist values do not fire triggers.
● User division changes and cascading deletes at metadata level do not invoke triggers.
Source: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_triggers.htm

Which scenario is valid for execution by unit tests?

⬜ A. Load data from a remote site with a callout.
✅ B. Set the created date of a record using a system method.
⬜ C. Execute anonymous Apex as a different user.
⬜ D. Generate a Visualforce PDF with getContentAsPDF().

Explanation:-
● Unit tests can set record fields like CreatedDate via Test.loadData or Test.setCreatedDate().
● Callouts require mocks. Anonymous Apex execution is not supported inside tests.
● getContentAsPDF() is not supported in test context.
Source: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_testing_unit_tests.htm

A developer has an integer variable called maxAttempts. It must preserve its value during the Apex transaction and share state between triggers. How should it be declared?

⬜ A. Declare on the trigger definition.
⬜ B. Private static variable on a helper class.
✅ C. Constant using static and final.
⬜ D. Variable on a helper class.

Explanation:-
● To preserve state across trigger executions within the same transaction, a static variable is required.
● Using static final makes it a constant, ensuring immutability.
● Declaring inside trigger does not persist across multiple executions in same transaction.
Source: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/langCon_apex_static_final.htm

What does the Lightning Component framework provide to developers?

⬜ A. Extended governor limits for applications
✅ B. Prebuilt components that can be reused.
⬜ C. Templates to create custom components.
⬜ D. Support for Classic and Lightning UIs.

Explanation:-
● The Lightning Component Framework offers reusable, prebuilt base components.
● These accelerate development and ensure consistent UI.
● It does not extend governor limits or directly support Classic UI.
Source: https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/intro_framework.htm

In the Lightning UI, where should a developer look to find information about a Paused Flow Interview?

✅ A. On the Paused Flow Interviews related list for a record
⬜ B. In the Paused Interviews section of the Apex Flex Queue
⬜ C. In the system debug log filtering for paused flows
⬜ D. On the Paused Flow Interviews component on the Home page

Explanation:-
● Paused Flow Interviews are visible in a related list on the relevant record.
● Apex Flex Queue only applies to batch jobs.
● Debug logs do not show paused interviews directly.
● Home page does not list them unless customized.
Source: https://help.salesforce.com/s/articleView?id=sf.flow_considerations_pause_resume.htm

^What is a correct pattern to follow when programming in Apex on a multitenant platform?

⬜ A. Use the with sharing keyword when declaring an Apex class to prevent access from other server tenants.
✅ B. Use queries to select the fewest fields and records possible to avoid exceeding governor limits.
⬜ C. Create Apex code in a separate environment from the schema to reduce deployment errors.
⬜ D. Run Data Manipulation Language (DML) on one record at a time to avoid possible data concurrency issues.

Explanation:-
● Salesforce runs on a multitenant architecture, meaning resources are shared among all orgs. To ensure fair usage, Apex governor limits are enforced.
● Best practice is to select only the fields and records you need in SOQL queries to minimize memory consumption and avoid hitting governor limits.
● Option A is incorrect: with sharing controls record-level access, not multitenancy.
● Option C is not a recognized pattern; code and schema live in the same environment.
● Option D is inefficient — the best practice is to perform DML on collections (bulk operations), not one record at a time.
Source: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_gov_limits.htm Topic: Developer Fundamentals

^Which two types of code represent the controller in model-view-controller (MVC) architecture on the Lightning Platform? (Select two answers.)

✅ A. StandardController system methods that are referenced by Visualforce
⬜ B. JavaScript that is used to make a menu item display itself
⬜ C. A static resource that contains Cascading Style Sheets (CSS) and images
✅ D. Custom Apex and JavaScript code that is used to manipulate data

Explanation:-
● In the MVC (Model-View-Controller) pattern used in Salesforce:
Model → Objects and fields (data).
View → Visualforce pages or Lightning components (UI).
Controller → Handles logic and interactions.
● StandardController system methods (A) and custom Apex controllers/extensions provide server-side logic.
● JavaScript controllers (D) in Lightning Components/LWC handle client-side logic and interaction, making them part of the Controller layer.
● CSS/Static Resources (C) are part of the View, not Controller.
● A menu’s display behavior (B) relates to UI behavior, not the Controller.
Source: https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_controller.htm
Topic: Developer Fundamentals

⬜ A. Create a workflow rule with a field update.
⬜ B. Create a Visualforce page.
⬜ C. Create a Lightning component.
✅ D. Create a record-triggered Flow.

Explanation:-
● The recommended solution is to use a record-triggered Flow. Flow Builder provides no-code automation that can respond to record changes, making it ideal for updating related records like Opportunities when the Account changes.
● Workflow Rules (A) are deprecated and no longer recommended for new automation.
● Visualforce pages (B) and Lightning components (C) are UI-focused and not suitable for background automation triggered by record updates.
● Record-triggered Flows are also part of Salesforce’s Order of Execution, ensuring changes happen consistently when records are saved.
Source: https://help.salesforce.com/s/articleView?id=sf.flow_build_trigger_record.htm
Topic: Developer Fundamentals

^A developer is creating an application to track engines and their parts. An individual part can be used in different types of engines. Which data model should the developer use to track the data and to prevent orphan records?

⬜ A. Create a master-detail relationship to represent the one-to-many model of engines to parts.
⬜ B. Create a lookup relationship to represent how each part relates to the parent engine object.
⬜ C. Create a junction object using two lookup relationships to relate many engines to many parts.
✅ D. Create a junction object using two master-detail relationships to relate many engines to many parts.

Explanation:-
● An engine can have many parts, and a part can belong to many engines, which is a classic many-to-many relationship.
● The best practice in Salesforce to represent a many-to-many relationship is to create a junction object.
● Using two master-detail relationships on the junction object ensures:
Referential integrity (no orphan records).
Cascade delete behavior.
Strong parent-child relationship control.
● Option A (single master-detail) only handles one-to-many, not many-to-many.
● Option B (lookup) allows flexibility but does not prevent orphan records.
● Option C (two lookups) would create a many-to-many link but without the strict parent-child enforcement, meaning orphan records are possible.
Source: https://developer.salesforce.com/docs/atlas.en-us.object_relationships.meta/object_relationships/object_relationships.htm
Topic: Developer Fundamentals

^A company wants a recruiting app and data model for job candidates and interviews, with the following requirements:
Display the total number of interviews on each candidate record.
Define security on interview records that’s independent from the security on candidate records.

Which two actions should a developer take to achieve this? (Select two answers.)

✅ A. Create a lookup relationship between the Candidate and Interview objects.
⬜ B. Create a master-detail relationship between the Candidate and Interview objects.
⬜ C. Create a roll-up summary field on the Candidate object that counts interview records.
✅ D. Create a trigger on the Interview object that updates a field on the Candidate object.

Explanation:-
● To keep Interview security independent from Candidate security, the relationship must be a lookup (A). A master-detail relationship (B) would inherit Candidate record security, violating the requirement.
● Roll-up summary fields (C) are only available with master-detail relationships, so they cannot be used here.
● To display the total number of interviews per candidate with a lookup relationship, a trigger (D) on Interview can be used to increment/update a field on Candidate whenever interviews are created, updated, or deleted.
Source: https://developer.salesforce.com/docs/atlas.en-us.object_relationships.meta/object_relationships/object_relationships.htm
Topic: Developer Fundamentals

^The sales management team requires that users populate the Lead Source field of the lead record when they convert a lead. What should a developer create to ensure that users do this?

⬜ A. Flow trigger
✅ B. Validation rule
⬜ C. Formula field
⬜ D. Apex trigger

Explanation:-
● A validation rule enforces that users populate the Lead Source field before they can save or convert the lead.
● If the field is blank, the validation rule prevents saving and shows an error message.
● Formula fields (C) are read-only and cannot enforce user input.
● Apex triggers (D) could enforce this, but they are unnecessarily complex when a point-and-click validation rule is sufficient.
● Flow triggers (A) are deprecated and are not the best practice here.
Source: https://help.salesforce.com/s/articleView?id=sf.fields_validation_rules_overview.htm
Topic: Developer Fundamentals

^The sales management team hires a new intern. The intern is not allowed to view opportunities, but needs to see the most recent closed date of all child opportunities when viewing an account record. What should a developer do to meet this requirement?

⬜ A. Write a Flow on the Opportunity object that updates a field on the parent account.
✅ B. Create a roll-up summary field on the Account object that performs a MAX on the Opportunity Close Date field.
⬜ C. Create a formula field on the Account object that performs a MAX on the Opportunity Close Date field.
⬜ D. Create a trigger on the Account object that queries the close date of the most recent opportunities.

Explanation:-
● A roll-up summary field on the parent can aggregate child records without granting the user visibility to those child records.
● Using MAX on Opportunity Close Date provides the latest close date across all Opportunities related to the Account and displays it on the Account record, which the intern can see.
● A formula field (C) cannot traverse and aggregate over child records.
● Flow/trigger (A/D) are possible, but a declarative roll-up is simpler and maintains the value automatically during the order of execution.
Source: https://help.salesforce.com/s/articleView?id=sf.fields_about_roll_up_summary_fields.htm
Topic: Developer Fundamentals

^A developer has this trigger that fires after insert and creates a child case whenever a new case is created. Which unexpected behavior happens after the code block executes?
List<Case> childCases = new List<Case>();
for (Case parent : Trigger.new) {
    Case child = new Case(
        ParentId = parent.Id,
        Subject = parent.Subject
    );
    childCases.add(child);
}
insert childCases;

⬜ A. A child case is created for each parent case in Trigger.new.
✅ B. The trigger enters an infinite loop and eventually fails.
⬜ C. Multiple child cases are created for each parent case in Trigger.new.
⬜ D. The trigger fails if the Subject field on the parent is blank.

Explanation:-
● The trigger is after insert and performs an insert childCases;.
● Inserting new Case records inside an after-insert Case trigger fires the same trigger again, creating a recursive loop (child creates another child, and so on).
● This recursion continues until a governor limit (e.g., DML statements, CPU time, trigger depth) is hit, causing a failure.
● To prevent this, use a recursion guard (e.g., a static boolean in a handler), or move logic to before insert with conditions, or set a flag on child cases to skip re-entry.
Source: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_triggers_bestpract.htm Topic: Developer Fundamentals

^A developer wants to create a custom object to track customer invoices. How should you relate invoices and accounts to ensure that all invoices are visible to everyone with access to an account?

⬜ A. The Account should have a lookup relationship to the Invoice.
⬜ B. The Invoice should have a lookup relationship to the Account.
⬜ C. The Account should have a master-detail relationship to the Invoice.
✅ D. The Invoice should have a master-detail relationship to the Account.

Explanation:-
● To make all invoices visible to anyone with access to the Account, the correct approach is to create a master-detail relationship from Invoice → Account.
● In a master-detail relationship, the parent (Account) controls record-level access, sharing, and ownership of the child (Invoice).
● If a lookup relationship were used (A or B), record visibility would not automatically be inherited, and separate sharing rules would need to be configured.
● Option C reverses the relationship incorrectly — Accounts are standard objects and cannot be children in a master-detail relationship.
Source: https://developer.salesforce.com/docs/atlas.en-us.object_relationships.meta/object_relationships/object_relationships_considerations.htm
Topic: Developer Fundamentals

^A custom field on the Account object was required for prototyping but is no longer needed. What is the correct process for a developer to delete the custom field?

⬜ A. Delete the field and then all references in the code will be removed.
⬜ B. Remove all the references in the code and then the field will be automatically removed.
⬜ C. Mark the field for deletion in Schema Builder and then delete it from the user interface.
✅ D. Remove all references to the custom field and then delete the custom field.

Explanation:-
● Salesforce does not automatically remove field references from Apex code, validation rules, workflows, flows, process builder, page layouts, reports, or formula fields.
● If a field is deleted while still referenced in any of these, it will cause errors and break functionality.
● The correct process is to first remove all references to the field across code and automation, and then delete the field from the object.
● Option A is incorrect because deleting the field does not remove its references.
● Option B is misleading — removing references does not remove the field automatically; it still must be deleted manually.
● Option C is incorrect — Schema Builder does not support direct deletion of fields.
Source: https://help.salesforce.com/s/articleView?id=sf.fields_managing.htm
Topic: Developer Fundamentals

^When loading data into an organization, which two actions should a developer take to match the updates to existing records?

⬜ A. Match an auto-generated Number field to a column in the imported file.
✅ B. Match the ID field to a column in the imported file.
✅ C. Match an External ID field to a column in the imported file.
⬜ D. Match the Name field to a column in the imported file.

Explanation:-
● The correct way to update existing records is by using a unique identifier.
● Salesforce Record ID (B) is the most reliable identifier since it’s system-generated and unique per record.
● External IDs (C) can also be used — these are custom fields marked as External ID, often matching unique identifiers from external systems, making data updates more efficient.
● Option A is incorrect because auto-generated numbers are not consistent across imports.
● Option D is incorrect because Name fields may not be unique and could result in mismatched or duplicate updates.
Source: https://help.salesforce.com/s/articleView?id=sf.data_import_update.htm
Topic: Developer Fundamentals

^When the number of records in a recordset is unknown, which control statement should a developer use to implement a set of code that executes for every record in the recordset, without performing a .size() or .length() method call?

⬜ A. do { … } while (condition)
⬜ B. while (condition) { … }
⬜ C. for (init_stmt; exit_condition; increment_stmt) { … }
✅ D. for (variable : list_or_set) { … }

Explanation:-
● The enhanced for loop (for-each) automatically iterates over each element in a list, set, or array without needing .size() or .length().
● It improves readability and prevents index errors.
● while and do-while loops require manual conditions, usually with .size().
● Traditional for loops require initialization, exit, and increment logic.
● The enhanced for loop is the best choice when the record count is unknown.
Source: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/langCon_apex_loops_for.htm
Topic: Process Automation and Logic - Review Declarative Features and Basic Constructs in Apex

^What is the value of x after the code segment below executes?
String x = 'A';
Integer i = 10;
if (i < 15) {
    i = 15;
    x = 'B';
} elseif (i < 20) {
    x = 'C';
} else {
    x = 'D';
}

⬜ A. ‘A’
✅ B. ‘B’
⬜ C. ‘C’
⬜ D. ‘D’

Explanation:-
● Initially, x = ‘A’ and i = 10.
● The first condition (i < 15) is true, so i is set to 15 and x is updated to ‘B’.
● Because if-elseif-else executes only one branch, the rest are skipped.
● Final value of x = ‘B’.
Source: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/langCon_apex_conditionals_if_else.htm
Topic: Process Automation and Logic - Review Declarative Features and Basic Constructs in Apex

^Which three are accurate statements about variable scope?

✅ A. A variable can be defined at any point in a block.
✅ B. Sub-blocks cannot redefine a parent block’s variable name.
⬜ C. Sub-blocks can reuse a parent block’s variable name if its value is null.
✅ D. Parallel blocks can use the same variable name.
⬜ E. A static variable can restrict the scope to the current block if its value is null.

Explanation:-
● Variables may be declared at any point inside a block.
● Sub-blocks cannot redeclare a variable name that already exists in a parent block; it causes a compilation error.
● Parallel blocks (like different branches of an if statement) can reuse the same variable name because they don’t overlap.
● Null values do not affect scope.
● Static variables always have class-level scope, independent of value.
Source: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/langCon_apex_variables.htm
Topic: Process Automation and Logic - Review Declarative Features and Basic Constructs in Apex

^An sObject named Application__c has a lookup relationship to another sObject named Position__c. Both Application__c and Position__c have a picklist field named Status__c. When the Status__c field on Position__c is updated, the Status__c field on Application__c needs to be populated automatically with the same value. How can a developer achieve this?

✅ A. By using a trigger with a DML operation
⬜ B. By configuring a cross-object field update with a workflow
⬜ C. By changing Status__c field in Application__c into a formula field
⬜ D. By changing the Status__c in Application__c into a roll-up summary field

Explanation:-
● Cross-object workflow field updates and roll-up summary fields only work with master-detail relationships, not lookups.
● A formula field would mirror the parent’s value but would not populate/persist the value on Application__c.
● To actually write and store the same picklist value on Application__c whenever Position__c.Status__c changes, implement a trigger on Position__c that queries related Application__c records and performs a DML update.
Source: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_triggers.htm
Topic: Process Automation and Logic - Declarative Features and Basic Constructs in Apex

^A developer in a Salesforce org with 100 accounts executes the code below using the Developer Console. How many accounts are in the org after this code executes?
Account myAccount = new Account(Name='MyAccount');
insert myAccount;

for(Integer x = 0; x < 150; x++) {
    Account newAccount = new Account(Name='MyAccount' + x);
    try {
        insert newAccount;
    } catch(Exception ex) {
        System.debug(ex);
    }
}
insert new Account(Name='MyAccount');

✅ A. 100
⬜ B. 101
⬜ C. 102
⬜ D. 252

Explanation:-
● Apex allows 150 DML statements per transaction.
● The loop attempts 150 inserts. The 151st DML occurs when x = 149 (after the initial insert myAccount), which raises a System.LimitException.
● LimitException is uncatchable, even inside try/catch, so the entire transaction aborts and rolls back all DML done in the transaction (including the initial insert and any successful loop inserts).
● The final insert new Account(…) is never reached.
● Net effect: the org remains at the original 100 accounts.
● Best practice: avoid DML inside loops; bulkify by collecting records and performing one insert outside the loop.
Source: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_gov_limits.htm
Topic: Process Automation and Logic - SOQL, SOSL, and DML

^Which two statements should a developer avoid using inside procedural loops?

✅ A. List <Contact> contacts = [SELECT Id, Salutation, FirstName, LastName, Email FROM Contact WHERE AccountId = :a.Id];
✅ B. update contactList;
⬜ C. if (o.AccountId == a.Id)
⬜ D. System.debug('Amount of CPU time (in ms) used so far: ' + Limits.getCpuTime());

Explanation:-
● SOQL queries (A) inside loops should be avoided. Apex enforces a governor limit of 100 SOQL queries per transaction, and placing queries inside loops can easily exceed this limit. Best practice is to query once, store results in a collection, and iterate over it.
● DML statements (B) inside loops should also be avoided. Apex enforces a governor limit of 150 DML statements per transaction. Doing DML per iteration risks hitting this limit. Best practice is to collect records in a list and perform a single bulk DML operation outside the loop.
● Condition checks (C) inside loops are harmless and common.
● Debug statements (D) and calls to Limits methods are safe; they do not count against DML or SOQL limits.
Source: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_qs_best_practices.htm
Topic: Process Automation and Logic - SOQL, SOSL, and DML

^A developer needs to create records for the object Property__c. The developer creates this code block. Which line of code should the developer insert at line 03 to ensure that at least some records are created, even if a few records have errors and fail to be created?
01 List<Property__c> propertiesToCreate = helperClass.createProperties();
02 try {
03
04 } catch (Exception exp){
05     //Exception handling
06 }

⬜ A. insert propertiesToCreate;
✅ B. Database.insert(propertiesToCreate, false);
⬜ C. Database.insert(propertiesToCreate);
⬜ D. Database.insert(propertiesToCreate, System.ALLOW_PARTIAL);

Explanation:-
● Using the Database.insert(records, allOrNone) method provides control over whether the entire operation must succeed.
● If allOrNone = true (default), the entire transaction fails if even one record has an error.
● If allOrNone = false, successful records are committed while failed records return errors in the Database.SaveResult.
● Standard insert (A) and Database.insert(records) (C) behave like allOrNone=true, so no partial success.
● Option D is invalid because System.ALLOW_PARTIAL is not a valid flag in Apex DML.
Source: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_methods_system_database.htm#apex_System_Database_insert
Topic: Process Automation and Logic - SOQL, SOSL, and DML

^What is an accurate constructor for a custom controller named MyController?

⬜ A.

public MyController(ApexPages.StandardController stdController){
   account = (Account)stdController.getRecord();
}

✅ B.

public MyController(){
   account = new Account();
}

⬜ C.

public MyController(SObject obj){
   account = (Account) obj;
}

⬜ D.

public MyController(List objects){
   accounts = (List)objects;
}

Explanation:-
● A custom controller is an Apex class used with a Visualforce page that is not tied to a StandardController.
● Its constructor must be public and take no parameters.
● Option B is correct: it initializes a new Account instance inside a parameterless constructor.
● Option A is valid for an extension, not a pure custom controller, because extensions accept ApexPages.StandardController as a parameter.
● Options C and D are invalid because constructors cannot arbitrarily accept SObjects or Lists in the definition of a Visualforce custom controller.
Source: https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_controller_custom.htm
Topic: Process Automation and Logic - Apex Classes and Triggers

^A developer uses a before insert trigger on the Lead object to fetch the Territory__c object, where the Territory__c.PostalCode__c matches the Lead.PostalCode. The code fails when the developer uses the Apex Data Loader to insert 10,000 lead records. The developer has the code block below. Which line of code causes the code block to fail?
01 for(Lead l : Trigger.new){
02    if(l.PostalCode != null){
03      List<Territory__c> terrList = [SELECT Id FROM
  Territory__c WHERE PostalCode__c = :l.PostalCode];
04      if(terrList.size() > 0){
05          l.Territory__c = terrList[0].Id;
06        }
07     }
08  }

⬜ A. 01: Trigger.new is not valid in a before insert trigger.
⬜ B. 02: A NullPointer exception is thrown if PostalCode is null.
✅ C. 03: A SOQL query is located inside of the for loop code.
⬜ D. 05: The lead in a before insert trigger cannot be updated.

Explanation:-
● Line 03 issues a SOQL query inside the loop, causing one query per Lead. With Data Loader’s default batch size (often 200), the trigger will try ~200 queries in a single transaction and hit the SOQL governor limit (100 per transaction), throwing System.LimitException.
● Line 01 is valid—Trigger.new is exactly how you iterate new records in a before-insert trigger.
● Line 02 safely guards against null; no NPE is thrown because the if checks for null.
● Line 05 is valid—before insert allows you to set field values on the records in Trigger.new.
● Fix (bulkify): query Territories once using all distinct postal codes from Trigger.new, put results in a Map<String, Territory__c>, then set l.Territory__c from the map inside the loop.
Source: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_gov_limits.htm
Source: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_triggers_bestpract.htm
Topic: Process Automation and Logic - Apex Classes and Triggers

✅ A. before update
✅ B. before insert
⬜ C. after insert
⬜ D. after update

Explanation:-
● Before insert triggers allow you to set field values on new records before they are committed to the database. This means you can populate ReportsTo without issuing an extra DML statement.
● Before update triggers allow you to modify field values on existing records as they are being updated, again without performing an additional DML.
● After insert and after update triggers are typically used when related records must be created/updated and require the record Id. But here, the requirement is to populate a field on the same Contact, so “before” triggers are more efficient and correct.
Source: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_triggers_context_variables_considerations.htm
Topic: Process Automation and Logic - Apex Classes and Triggers

^According to the order of execution, in which sequence does Salesforce execute these high-level events upon saving a record?

✅ A. System Validation Rules; Before Save Flows; Before Triggers; Custom Validation Rules; After Triggers; Workflow Rules; Flow Automations; After Save Flows; Commit
⬜ B. Before Triggers; Before Save Flows; Validation Rules; Workflow Rules; After Save Flows; Flow Automations; After Triggers; Commit
⬜ C. Validation Rules; Before Triggers; Before Save Flows; Workflow Rules; After Triggers; Flow Automations; Workflow Rules; After Save Flows; Commit
⬜ D. Before Save Flows; Before Triggers; Validation Rules; After Triggers; Workflow Rules; Flow Automations; After Save Flows; Validation Rules; Commit

Explanation:-
● Salesforce follows a strict order of execution when saving a record.
● First, system validation checks run (field formats, required fields, foreign key constraints).
● Then before-save flows execute, followed by before triggers.
● After that, custom validation rules run, and system validations are checked again.
● The record is saved to the database (not yet committed).
● Then after triggers fire.
● Next, workflow rules and their field updates execute.
● Process Builder and other Flow automations run, but not in a guaranteed order.
● Finally, after-save flows execute, and only then the transaction is committed.
Source: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_triggers_order_of_execution.htm
Topic: Process Automation and Logic - Apex Classes and Triggers

^How can a developer determine if a CustomObject__c record has been manually shared with the current user in Apex?

⬜ A. By calling the profile settings of the current user
✅ B. By querying CustomObject__Share
⬜ C. By calling the isShared() method for the record
⬜ D. By querying the role hierarchy

Explanation:-
● Salesforce creates a special share object for every custom object (e.g., CustomObject__Share).
● Developers can query this share object to check if a record has been explicitly shared with a user.
● Profile settings (A) and role hierarchy (D) determine implicit access, not manual shares.
● There is no isShared() method (C) on sObjects.
● Example query:

List<CustomObject__Share> shares = [
   SELECT UserOrGroupId, RowCause 
   FROM CustomObject__Share 
   WHERE ParentId = :recordId AND UserOrGroupId = :UserInfo.getUserId()
];

If a record exists, it has been manually shared with the current user.
Source: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_bulk_sharing_understanding.htm
Topic: Process Automation and Logic - Apex Classes and Triggers

^A workflow rule changes the value of a field on an object. An Apex after update trigger exists for the object. What happens when a user updates a record?

✅ A. The Apex trigger is fired more than once.
⬜ B. The workflow rule is fired more than once.
⬜ C. No changes are made to the data.
⬜ D. Both the Apex trigger and workflow rule are fired only once.

Explanation:-
● On save, Salesforce runs system validations → before-save flows → before triggers → custom validations → saves the record → after triggers → workflow rules.
● If a workflow field update changes the record, Salesforce performs another update of the record, which causes before/after update triggers to fire again (one additional time).
● Workflow rules themselves evaluate once in the transaction; it’s the field update that causes the extra trigger execution.
● Therefore, the after update trigger runs more than once (initial update and the workflow-induced update).
Source: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_triggers_order_of_execution.htm
Topic: Process Automation and Logic - Apex Classes and Triggers

⬜ A. Utilize the standard controller for Position__c and expression syntax in the page to display related Review__c data through the Job_Application__c object.
⬜ B. Utilize the standard controller for Position__c and cross-object formula fields on the Job_Application__c object to display Review__c data.
⬜ C. Utilize the standard controller for Position__c and cross-object formula fields on the Review__c object to display Review__c data.
✅ D. Utilize the standard controller for Position__c and a controller extension to query for Review__c data.

Explanation:-
● The standard controller for Position__c allows Visualforce pages to work directly with Position__c records.
● To display related child records (Review__c), you need to write SOQL queries to retrieve those records. This is done via a controller extension, which augments the standard controller.
● Formula fields (B and C) are not efficient or scalable for listing multiple related records.
● Expression syntax (A) does not allow traversing two relationships deep (Position__c → Job_Application__c → Review__c).
Source: https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_controller_extension.htm
Topic: User Interface - Visualforce

^What are two capabilities of a StandardSetController?

✅ A. It allows pages to perform mass updates of records.
✅ B. It allows pages to perform pagination with large record sets.
⬜ C. It extends the functionality of a standard or custom controller.
⬜ D. It enforces field-level security when reading large record sets.

Explanation:-
Mass updates: The StandardSetController class provides access to a prototype object whose field values can be applied to every record in the collection during save — enabling bulk or mass updates directly from a Visualforce page.
Pagination: StandardSetController supports built-in pagination methods (setPageSize, next, previous) to efficiently handle large record sets without displaying all records at once.
● It does not extend standard/custom controllers (C); it is a separate controller type.
● It does not automatically enforce field-level security (D). Developers must handle FLS checks explicitly if needed.
Source: https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/apex_pages_standardsetcontroller.htm Topic: User Interface - Visualforce

^A Visualforce page has a standard controller for an object that has a lookup relationship to a parent object. How can a developer display data from the parent record on the page?

⬜ A. Use SOQL on the Visualforce page to query for data from the parent record.
⬜ B. Add a second standard controller to the page for the parent record.
⬜ C. Use a roll-up formula field on the child record to include data from the parent record.
✅ D. Use merge field syntax to retrieve data from the parent record.

Explanation:-
● Visualforce pages support merge field syntax (e.g., {!Child__c.Parent__r.FieldName}) that allows referencing parent object fields directly from the standard controller.
● No extra SOQL query (A) or second controller (B) is needed — the standard controller already provides parent relationship access.
● Roll-up formulas (C) aggregate child → parent, not parent → child.
● Therefore, the correct approach is to use merge field syntax to directly display parent fields.
Source: https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_controller_standard.htm
Topic: User Interface - Visualforce

^What are two reasons that a developer should use a custom Visualforce page in a Lightning Platform application?

✅ A. To generate a PDF document with application data
✅ B. To create components for dashboards and layouts
⬜ C. To deploy components between two organizations
⬜ D. To modify the page layout settings for a custom object

Explanation:-
● Visualforce pages provide functionality that Lightning pages alone cannot, such as rendering PDF documents from application data.
● Visualforce can also be embedded within dashboards and layouts to extend standard UI with custom components.
● Deployment between orgs (C) is done using metadata tools (Change Sets, SFDX, etc.), not Visualforce.
● Page layout modifications (D) are handled with standard page layout editor, not custom Visualforce.
Source: https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_intro.htm
Topic: User Interface - Visualforce

^A hierarchy custom setting stores a specific URL for each profile in Salesforce. Which statement can a developer use to retrieve the correct URL for the current user’s profile and display this on a Visualforce Page?

✅ A. {!$Setup.Url_Settings__c.URL__c}
⬜ B. {!$Setup.Url_Settings__c.Instance[Profile.Id].URL__c}
⬜ C. {!$Setup.Url_Settings__c[Profile.Id].URL__c}
⬜ D. {!$Setup.Url_Settings__c[$Profile.Id].URL__c}

Explanation:-
Hierarchy Custom Settings allow values to be defined at org, profile, or user level. When you reference them directly (e.g., $Setup.Url_Settings__c.URL__c), Salesforce automatically applies the correct level of precedence:
1.User-level value (if defined).
2.Otherwise, Profile-level value.
3.Otherwise, Org-wide default value.

This means you don’t need to explicitly reference Profile.Id. Salesforce resolves the correct URL automatically.
Options B, C, and D are invalid or unnecessary syntax in Visualforce merge expressions.
Source: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_customsettings_hierarchy.htm
Topic: User Interface - Visualforce

^A developer wants to display all of the available record types for a Case object. The developer also wants to display the picklist values for the Case.Status field. The Case object and the Case.Status field are on a custom Visualforce page. Which two actions should the developer perform to get the record types and picklist values in the controller?

✅ A. Use Schema.RecordTypeInfo returned by Case.SObjectType.getDescribe().getRecordTypeInfos().
⬜ B. Use SOQL to query case records in the org to get all the RecordType values available for Case.
✅ C. Use Schema.PicklistEntry returned by Case.Status.getDescribe().getPicklistValues().
⬜ D. Use SOQL to query case records in the org to get all values for the Status picklist field.

Explanation:-
● To get record type information, use the getDescribe() method on the Case object and then call getRecordTypeInfos(). This returns Schema.RecordTypeInfo objects with details about each record type.
● To get picklist values, use the field describe (Case.Status.getDescribe()) and call getPicklistValues(). This returns a list of Schema.PicklistEntry objects representing all picklist values for that field.
● SOQL queries (B and D) cannot directly retrieve metadata like record types or picklist value definitions. Metadata must be retrieved using Schema Describe methods.
Source: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_dynamic_describe_objects.htm
Topic: User Interface - Visualforce

^A developer needs to create a Visualforce page that will override the standard Account edit button. The page will be used to validate the account’s address using a SOQL query. The page will also allow the user to make edits to the address. Where should the developer write the account address verification logic?

⬜ A. In a standard extension
⬜ B. In a custom controller
⬜ C. In a standard controller
✅ D. In a controller extension

Explanation:-
● A controller extension allows you to extend or override the behavior of a standard controller while retaining built-in functionality (such as edit, save, delete).
● This is the best approach when overriding the standard Account edit button because it keeps all standard behaviors (field binding, save, validation) while allowing you to add custom address verification logic.
● A custom controller (B) would force you to rebuild all Account logic from scratch, which is unnecessary.
● Standard controller (C) cannot be customized to include additional business logic.
● Standard extension (A) is not a Salesforce concept — the correct terminology is controller extension.
Source: https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_controller_extension.htm Topic: User Interface - Visualforce

^Which two resources can you include in a Lightning component bundle?

⬜ A. Adobe Flash
✅ B. Helper
⬜ C. Apex class
✅ D. Documentation

Explanation:-
A Lightning component bundle contains a component or app and all related client-side resources, such as:
● Helper: JavaScript code used to handle logic and reusable functions.
● Controller: Client-side controller written in JavaScript.
● Style: CSS for styling the component.
● Renderer: Custom rendering behavior.
● Documentation: Provides reference material and usage information for the component.
● SVG: For custom icons.

Apex classes (C) are server-side resources and are referenced separately, not included in the bundle itself.
Adobe Flash (A) is obsolete and not supported in Salesforce.
Source: https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/ref_components_bundle.htm
Topic: User Interface - Lightning Component Framework

^What is a benefit of the Lightning Component framework?

⬜ A. It automatically replicates the classic Salesforce look and feel
⬜ B. Better integration with Salesforce Sites
⬜ C. More centralized control via server-side logic
✅ D. Better performance for custom Salesforce mobile apps

Explanation:-
● The Lightning Component framework is built for dynamic, responsive, client-side applications.
● It provides out-of-the-box mobile-optimized components, ensuring seamless performance for Salesforce mobile apps.
● It uses a client-side JavaScript framework (Aura / LWC) for faster rendering and better user experience on mobile devices.
● Option A is incorrect: Lightning does not replicate Classic; it has a modern UI.
● Option B is incorrect: Lightning focuses on Lightning Experience and mobile, not Salesforce Sites.
● Option C is incorrect: Lightning emphasizes client-side control, not centralized server-side logic.
Source: https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/intro_framework.htm
Topic: User Interface - Lightning Component Framework

^A developer creates a new Visualforce page and Apex extension, and writes test classes that exercise 95% coverage of the new Apex extension. Change set deployment to production fails with the test coverage warning: “Average test coverage across all Apex classes and triggers is 74%, at least 75% test coverage is required.” What can the developer do to successfully deploy the new Visualforce page and extension?

⬜ A. Create test classes to exercise the Visualforce page markup.
⬜ B. Select Fast Deployment to bypass running all the tests.
⬜ C. Select ‘Disable Parallel Apex Testing’ to run all the tests.
✅ D. Add test methods to existing test classes from previous deployments.

Explanation:-
● Salesforce requires overall test coverage of at least 75% across the org (not just the new code) to deploy Apex to production.
● Even though the new extension has 95% coverage, the average coverage across all Apex classes and triggers is only 74%, causing deployment failure.
● The correct approach is to add or enhance test methods for existing Apex classes from previous deployments, increasing overall org-wide coverage above 75%.
● Testing Visualforce markup (A) is not counted toward Apex coverage.
● Fast Deployment (B) does not bypass coverage requirements.
● Disabling parallel Apex testing (C) only affects test execution order, not coverage.
Source: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_deploy.htm
Topic: Testing, Debugging, and Deployment

^Which is an accurate statement about creating unit tests in Apex?

⬜ A. Increased test coverage requires large test classes with many lines of code in one method.
⬜ B. Triggers do not require any unit tests in order for you to deploy them from sandbox to production.
⬜ C. Unit tests with multiple methods result in all methods failing when one method fails.
✅ D. System assert statements that do not increase code coverage contribute important feedback in unit tests.

Explanation:-
● The purpose of unit tests is not only to increase code coverage but also to validate application behavior and ensure that expected results occur.
● System.assert() statements provide critical feedback by checking that business logic executes correctly. They don’t directly increase code coverage but verify correctness.
● A (large single methods) is discouraged — best practice is to write small, modular tests.
● B is incorrect — triggers require test coverage to deploy to production; org-wide coverage must be ≥ 75%.
● C is incorrect — test methods are independent; if one fails, others can still pass.
Source: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_testing_best_practices.htm
Topic: Testing, Debugging, and Deployment

^What is the proper process for an Apex unit test?

✅ A. Create data for testing. Call the method being tested. Verify that the results are correct.
⬜ B. Query for test data using SeeAllData=true. Call the method being tested. Verify that the results are correct.
⬜ C. Create data for testing. Execute runAllTests(). Verify that the results are correct.
⬜ D. Query for test data using SeeAllData=true. Execute runAllTests(). Verify that the results are correct.

Explanation:-
● The best practice for Apex unit tests is to create your own test data in the test class. This ensures the test is independent of existing org data and portable across environments.
● Once data is prepared, the test should call the method being tested and then use assertions to verify that the output matches expectations.
● Using SeeAllData=true (B, D) is discouraged, as it makes tests unreliable and dependent on org data.
● runAllTests() (C, D) is used to execute all tests in the org but is not part of writing a single test method’s logic.
Source: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_testing_best_practices.htm
Topic: Testing, Debugging, and Deployment

^A developer has a single custom controller class that works with a Visualforce wizard to support creating and editing multiple sObjects. The wizard accepts data from user inputs across multiple Visualforce pages and from a parameter on the initial URL. Which three statements are necessary inside the unit test for the custom controller? (Select three answers.)

✅ A. Test.setCurrentPage(pageRef);
✅ B. String nextPage = controller.save().getUrl();
✅ C. ApexPages.currentPage().getParameters().put('input', 'TestValue');
⬜ D. public ExtendedController(ApexPages.StandardController cntrl) { }

Explanation:-
Test.setCurrentPage(pageRef) (A) is needed to simulate navigation to the Visualforce page and initialize the URL context.
controller.save().getUrl() (B) validates navigation behavior in the wizard by testing the save action and next page redirection.
ApexPages.currentPage().getParameters().put() (C) injects URL parameters into the test, mimicking user input passed via query string.
● Option D is simply a constructor definition in Apex, not something you call inside a test method.
Source: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_testing.htm
Topic: Testing, Debugging, and Deployment

✅ A. Create a method that creates valid account records, and call this method from within test methods.
⬜ B. Create a method that queries for valid account records, and call this method from within test methods.
✅ C. Create a method that loads valid account records from a static resource, and call this method within test methods.
⬜ D. Create a method that performs a callout for a valid account record, and call this method from within test methods.

Explanation:-
● Centralize test data creation: A helper method (or a dedicated Test Data Factory) that creates valid Account records ensures every test uses consistent, validation-compliant data. When validation rules change, you update only the factory, not every test.
● Static resource–backed data: Loading seed data from a static resource (C) via Test.loadData makes maintaining large, realistic datasets easier and keeps tests independent of org data.
● Do not query org data (B): Using existing data breaks test isolation and leads to flaky tests; SeeAllData=true is discouraged.
● Callouts (D) are irrelevant for creating valid Account test records and add unnecessary complexity/mocking.
Source: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_testing.htm
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_testing_data.htm
Topic: Testing, Debugging, and Deployment

^When working in a sandbox environment, which two things should the developer use to verify the functionality of a new test class before the developer deploys that test class to production? (Select two answers.)

✅ A. Test menu in the Developer Console
⬜ B. Run Tests menu page in Salesforce Setup
⬜ C. REST API and ApexTestRun method
✅ D. Apex Test Execution page in Salesforce Setup

Explanation:-
● The Developer Console provides a Test menu to run specific test classes, methods, or entire suites, making it a primary tool for developers to validate tests in a sandbox.
● The Apex Test Execution page in Setup lets you run unit tests, view their progress, and inspect results directly in the Salesforce UI.
● The Run Tests page in Setup (B) is outdated and has been replaced by Apex Test Execution for running tests.
● The REST API and ApexTestRun method (C) are useful for external tools or CI/CD pipelines but are not the recommended tools for manual validation in a sandbox before deployment.
Source: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_testing.htm
Topic: Testing, Debugging, and Deployment

^A developer has a block of code that omits any statements that indicate whether the code block should execute with or without sharing. What will automatically obey the organization-wide defaults and sharing settings for the user who executes the code in the Salesforce organization?

⬜ A. Apex controllers
⬜ B. Apex triggers
✅ C. Anonymous blocks
⬜ D. HTTP callouts

Explanation:-
● Anonymous blocks (executed via Developer Console, VS Code, or API) always run in the current user’s context, automatically enforcing organization-wide defaults (OWDs) and sharing rules.
● Apex classes default to “without sharing” unless explicitly declared otherwise, meaning they bypass sharing rules unless coded to respect them.
● Apex triggers also execute in system context, ignoring sharing rules.
● HTTP callouts are unrelated to record sharing or OWD enforcement.
● Therefore, only anonymous blocks inherently obey the user’s sharing rules.
Source: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_sharing.htm
Topic: Testing, Debugging, and Deployment

^A developer created an Apex trigger using the Developer Console and now wants to debug code. How can the developer accomplish this in the Developer Console?

⬜ A. Select the Override Log Triggers checkbox for the trigger.
⬜ B. Open the Progress tab in the Developer Console.
✅ C. Open the Logs tab in the Developer Console.
⬜ D. Add the user name in the Log Inspector.

Explanation:-
● To debug Apex triggers (or any Apex execution), developers can open the Logs tab in the Developer Console, where Salesforce automatically records execution logs.
● These logs show governor limits usage, SOQL queries, DML operations, and exceptions — essential for debugging.
● Option A is invalid because there is no “Override Log Triggers” setting.
● Option B (Progress tab) shows execution status but not debug logs.
● Option D is incorrect — the Log Inspector helps filter existing logs, but it does not itself capture logs.
Source: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_developer_console.htm
Topic: Testing, Debugging, and Deployment

^Which two types of information does the Checkpoints tab in the Developer Console provide? (Select two answers.)

✅ A. Namespace
⬜ B. Exception
✅ C. Time
⬜ D. Debug statement

Explanation:-
● The Checkpoints tab in the Developer Console displays saved checkpoints, which are snapshots of the state of objects in memory when the checkpoint was hit.
● Each checkpoint includes the namespace of the package that contains the checkpoint (A).
● It also records the date and time when the checkpoint was reached (C).
● Exceptions (B) and Debug statements (D) are not displayed in the Checkpoints tab; those are visible in the Logs tab.
Source: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_debugging_checkpoints.htm
Topic: Testing, Debugging, and Deployment

^What are two valid source and destination pairs that can send or receive change sets? (Select two answers.)

⬜ A. Developer Edition sandbox to sandbox
✅ B. Sandbox to production
⬜ C. Developer Edition org to production
✅ D. Sandbox to sandbox

Explanation:-
● Change sets can only be exchanged between related orgs (sandboxes created from the same production org and that production org itself).
● Valid connections include:
Sandbox → Production
Production → Sandbox
Sandbox → Sandbox (if both sandboxes belong to the same production org)
● Developer Edition orgs (A, C) do not support sending or receiving change sets, so those are invalid.
Source: https://help.salesforce.com/s/articleView?id=sf.changesets_about.htm
Topic: Testing, Debugging, and Deployment

^Which two components can you deploy using Metadata API? (Select two answers.)

⬜ A. Console Layout
✅ B. Account Layout
⬜ C. Case Feed Layout
✅ D. Case Layout

Explanation:-
● The Metadata API supports deployment of many metadata types, including object layouts such as Account Layouts and Case Layouts.
● Console Layouts (A) and Case Feed Layouts (C) are not supported metadata types for direct deployment using Metadata API.
● Typical deployable layout metadata includes: Layout (standard and custom object layouts like Account, Case, Opportunity).
Source: https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_layouts.htm
Topic: Testing, Debugging, and Deployment

^Which two answers are true for a partial sandbox but do not apply to a full sandbox? (Select two answers.)

✅ A. More frequent refreshes
⬜ B. Use of change sets
✅ C. Limited to 5 GB of data
⬜ D. Only includes necessary metadata

Explanation:-
● Partial Sandboxes refresh every 5 days, compared to Full Sandboxes which refresh every 29 days.
● They are limited to 5 GB of data and include only a subset of production data defined by a template.
● Full Sandboxes, in contrast, replicate the entire production org data with no such 5 GB restriction.
● Change sets (B) are supported in both Partial and Full sandboxes, so that is not unique.
● Metadata (D) is included in both sandbox types; the difference lies in the data storage limits, not metadata.
Source: https://help.salesforce.com/s/articleView?id=sf.data_sandbox_types.htm
Topic: Testing, Debugging, and Deployment