Summer Special 60% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: bestdeal

Free Salesforce PDI Practice Exam with Questions & Answers | Set: 3

Questions 21

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 all it's trainers?

Options:
A.

SELECT ID FROM Trainer_c WHERE Gym_r.Name = 'Viridian City Gym'

B.

SELECT Id, (SELECT Id FROM Trainer_c FROM Gym_c WHERE Name = ‘Viridian City Gym"

C.

SELECT Id, (SELECT Id FROM Trainers _r) FROM Gym_c WHERE Name = ‘Viridian City Gym'

D.

SELECT Id, (SELECT Id FROM Trainers _c) FROM Gym_c WHERE Name = 'Viridian City Gym'

Salesforce PDI Premium Access
Questions 22

Universal Containers (UC) is developing a process for their sales teams that requires all sales reps to go through a set of scripted steps with each new customer they create.

In the first step of collecting information, UC's ERP system must be checked via a REST endpoint to see if the customer exists. If the customer exists, the data must be presented to the sales rep in Salesforce.

Which two should a developer implement to satisfy the requirements?

Choose 2 answers

Options:
A.

Flow

B.

Invocable method

C.

Future method

D.

Trigger

Questions 23

For which three items can a trace flag be configured?

Choose 3 answers

Options:
A.

Apex Class

B.

Flow

C.

User

D.

Visualforce

E.

Apex Trigger

Questions 24

When a user edits the Postal Code on an Account, a custom Account text field named "Timezone" must be updated based on the values in another custom object called PostalCodeToTimezone__c.

What is the optimal way to implement this feature?

Options:
A.

Build a flow with Flow Builder.

B.

Create an account approval process.

C.

Create a formula field.

D.

Build an account assignment rule.

Questions 25

Consider the following code snippet:

apex

CopyEdit

public class with sharing AccountsController {

@AuraEnabled

public List getAllAccounts(){

return [SELECT Id, Name, Industry FROM Account];

}

}

Apex Test Class Snippet:

apex

CopyEdit

@isTest

private class with sharing AccountsController_Test {

@testSetup

private static void makeData(){

User user1 = [SELECT Id FROM User WHERE Profile.Name = 'System Administrator' AND isActive = true LIMIT 1];

User user2 = [SELECT Id FROM User WHERE Profile.Name = 'Standard User' AND UserName = 'test@test.com' AND isActive = true LIMIT 1];

TestUtils.insertAccounts(10, user1.Id);

TestUtils.insertAccounts(20, user2.Id);

}

@isTest

private static void getAllAccounts_StandardUser_Test(){

List result = AccountsController.getAllAccounts();

System.assertEquals(20, result.size());

}

}

When the test class runs, the assertion fails.

Which change should the developer implement in the Apex test method to ensure the test method executes successfully?

Options:
A.

Query the Administrator user into memory and enclose lines 15 and 16 within the System.runAs(user); method.

B.

Query the Standard User into memory and enclose lines 15 and 16 within the System.runAs(); method.

C.

Add @isTest(seeAllData=true); to line 12 and enclose lines 15 and 16 within Test.startTest(); and Test.stopTest();.

D.

Add System.runAs(user); to line 14 and enclose line 15 within Test.startTest(); and Test.stopTest();.

Questions 26

Which two events need to happen when deploying to a production org?

Choose 2 answers

Options:
A.

All custom objects must have visibility set to a value other than in Development.

B.

All Apex code must have at least 75% test coverage.

C.

All triggers must have some test coverage

D.

All Visual flows must have at least 1% test coverage.

Questions 27

Which action causes a before trigger to fire by default for Accounts?

Options:
A.

Renaming or replacing picklists

B.

updating addresses using Mass Address updated tool

C.

Importing data using the Data Loader and the Bulk API

D.

Converting Leads to Contacts

Questions 28

What are three considerations when using the @lnvocableMethod annotation in Apex?

Choose 3 answers

Options:
A.

Only one method using the @invecableMethod annotation can be defined per Apex class_

B.

A method using the @invecableMethod annotation can have multiple input parameters.

C.

A method using the @invocablemethod annotation must be declaredas static,

D.

GO A method using the @invocablemethod annotation must define a return value.

E.

A method using the @invocableMethod annotation can be declared as Public or Global.

Questions 29

A developer must write an Apex method that will be called from a Lightning component. The method may delete an Account stored in the accountRec variable.

Which method should a developer use to ensure only users that should be able to delete Accounts can successfully perform deletions?

Options:
A.

accountRec, isDeletable()

B.

Schema,sObjectType,Account, isDeletable ()

C.

accuntRec, sObjectType,isDeletable()

D.

Account,isDeleteable

Questions 30

Universal Containers wants to back up all of the data and attachments in its Salesforce org once a month.

Which approach should a developer use to meet this requirement?

Options:
A.

Schedule a report.

B.

Use the Data Loader command line.

C.

Define a Data Export scheduled job.

D.

Create a Schedulable Apex class.

Exam Code: PDI
Certification Provider: Salesforce
Exam Name: Salesforce Certified Platform Developer 1 (SP25)
Last Update: Jul 17, 2025
Questions: 204

Salesforce Free Exams

Salesforce Free Exams
Examstrack provides free Salesforce exam prep materials and practice tests to support your Salesforce certification goals.