Salesforce-Platform-Developer Practice Test

Salesforce Spring 25 Release -
Updated On 1-Jan-2026

237 Questions

Which three operations affect the number of times a trigger can fire? Choose 3 answers

A. Process Flows

B. Workflow Rules

C. Criteria-based Sharing calculations

D. Email messages

E. Roll-Up Summary fields

A.   Process Flows
B.   Workflow Rules
E.   Roll-Up Summary fields

Explanation:

1️⃣ Process Flows (A)

Record-triggered flows can update records, which can cause triggers to fire again if the changes meet the trigger conditions.

Example: If a flow updates a field, it might trigger an after update Apex trigger unexpectedly.

2️⃣ Workflow Rules (B)

Workflow rules can perform field updates, which may cause an Apex trigger to execute multiple times.

Example: A workflow updates a related record, which triggers another field change, leading to a new trigger execution cycle.

3️⃣ Roll-Up Summary Fields (E)

Roll-up summary fields recalculate when a child record changes, which can cause updates on the parent record.

If an Apex trigger is monitoring the parent record, these updates can make it fire multiple times.

Why Not C or D?

C. Criteria-Based Sharing Calculations → Changes in sharing settings do not modify record data directly, so they do not trigger Apex executions.
D. Email Messages → Sending email messages does not modify records, meaning it does not impact trigger execution cycles.

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.

B.   The test method relies on existing data in the sandbox.

Explanation:

Apex test methods run in an isolated test context, meaning they do not have access to existing org data unless @isTest(SeeAllData=true) is explicitly used.
When the developer copied the test method code into Execute Anonymous, the code ran outside the test execution context, allowing access to existing records in the database. However, during an actual unit test, Salesforce does not allow access to real org data, leading to failures if the test relies on non-test-created records.

A developer needs to create a baseline set of data (Account, Contacts, Products, Assets) for an entire suite allowing them to test independent requirements for various types of Salesforce Cases. Which approach can efficiently generate the required data for each unit test?

A. Use &TestSteup with a void method.

B. Create test data before Test.startTest in the unit test.

C. Create a mock using the Stub APL.

D. Add $ IsTest (seeAllDatatrue) at the start of the unit test class.

A.   Use &TestSteup with a void method.

Explanation:

@TestSetup methods are used in test classes to create test data once and share it across all test methods in the same class.
This improves efficiency and reduces duplication of data creation code.
Ideal for baseline data like Accounts, Contacts, Products, and Assets that are common across test methods.

A developer wants to invoke on outbound message when a record meets a specific criteria. Which three features satisfy this use case? Choose 3 answer

A. Approval Process has the capacity to check the record criteria and send an outbound message without Apex Code

B. Process builder can be used to check the record criteria and send an outbound message with Apex Code.

C. workflows can be used to check the record criteria and send an outbound message.

D. Process builder can be used to check the record criteria and send an outbound messagewithout Apex Code.

E. Visual Workflow can be used to check the record criteria and send an outbound message without Apex Code.

A.   Approval Process has the capacity to check the record criteria and send an outbound message without Apex Code
C.   workflows can be used to check the record criteria and send an outbound message.
D.   Process builder can be used to check the record criteria and send an outbound messagewithout Apex Code.

Explanation:

To send an outbound message when a record meets specific criteria (without Apex), use these declarative tools:

Approval Process (A):

Criteria: Configure entry conditions in the approval process.

Outbound Message: Add an outbound message action to notify external systems when a record is approved/rejected.

Workflow Rule (C):

Criteria: Define rule conditions (e.g., "Status = Closed Won").
Outbound Message: Add an outbound message action as the workflow action.

Process Builder (D):

Criteria: Set up conditions in the process.

Outbound Message: Use the "Send Outbound Message" action in the process.

Why Other Options Are Incorrect:

B: Process Builder does not require Apex to send outbound messages (it’s declarative).

E: Visual Workflow (Flow) cannot send outbound messages natively (requires Apex or Process Builder integration).

What is an example of a polymorphic lookup field in Salesforce?

A. The Parentid field on the standard Account object

B. The LeadId and ContactId fields on the standard Campaign Member object

C. A custom field, Link c, on the standard Contact object that looks up to an Account or a Campaign

D. The Whatld field on the standard Event object

D.   The Whatld field on the standard Event object

Explanation:

A polymorphic lookup field in Salesforce can reference multiple object types. The most common examples are:

WhatId on Event (D):

Can reference multiple standard objects (e.g., Account, Opportunity, Case, Custom Objects).
Used to associate an Event with any of these records.
Other Polymorphic Lookups:
ParentId (Task): References Leads, Contacts, and other objects.
WhoId (Event/Task): References Contacts or Leads.

Why Other Options Are Incorrect:

A: ParentId on Account is not polymorphic (only references Account for hierarchy).
B: LeadId and ContactId are separate fields, not a single polymorphic field.
C: Custom fields cannot be polymorphic (only standard fields support this).

Salesforce-Platform-Developer Exam Questions - Home Previous
Page 7 out of 48 Pages