Spring Sale Limited Time 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: 65pass65

PDI Salesforce Certified Platform Developer (Plat-Dev-201) is now Stable and With Pass Result | Test Your Knowledge for Free

PDI Practice Questions

Salesforce Certified Platform Developer (Plat-Dev-201)

Last Update 7 hours ago
Total Questions : 204

Dive into our fully updated and stable PDI practice test platform, featuring all the latest Developers exam questions added this week. Our preparation tool is more than just a Salesforce study aid; it's a strategic advantage.

Our free Developers practice questions crafted to reflect the domains and difficulty of the actual exam. The detailed rationales explain the 'why' behind each answer, reinforcing key concepts about PDI. Use this test to pinpoint which areas you need to focus your study on.

PDI PDF

PDI PDF (Printable)
$43.75
$124.99

PDI Testing Engine

PDI PDF (Printable)
$50.75
$144.99

PDI PDF + Testing Engine

PDI PDF (Printable)
$63.7
$181.99
Question # 21

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();.

Discussion 0
Question # 22

Universal Containers decided to transition from Classic to Lightning Experience. They asked a developer to replace a JavaScript button that was being used to create records with prepopulated values.

What can the developer use to accomplish this?

Options:

A.  

Validation rules

B.  

Apex triggers

C.  

Record triggered flows

D.  

Quick Actions

Discussion 0
Question # 23

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

Options:

A.  

The parent component can invoke a public method in the child component.

B.  

The parent component can use a public property to pass the data to the child component,

C.  

The parent can use the Apex controller class to send data to the child component.

D.  

The parent component can use a custom event to pass the data to the child component.

Discussion 0
Question # 24

Flow Builder uses an Apex action to provide additional information about multiple Contacts, stored in a custom class ContactInfo.

Which is the correct definition of the Apex method that gets the additional information?

Options:

A.  

@InvocableMethod(label='Additional Info') public ContactInfo getInfo(Id contactId) { /* implementation */ }

B.  

@InvocableMethod(label='Additional Info') public static List getInfo(List contactIds) { /* implementation */ }

C.  

@InvocableMethod(label='Additional Info') public static ContactInfo getInfo(Id contactId) { /* implementation */ }

D.  

@InvocableMethod(label='Additional Info') public List getInfo(List contactIds) { /* implementation */ }

Discussion 0
Question # 25

A developer creates a batch Apex job to update a large number of records, and receives reports of the job timing out and not completing.

What is the first step towards troubleshooting the issue?

Options:

A.  

Check the asynchronous job monitoring page to view the job status and logs.

B.  

Check the debug logs for the batch job.

C.  

Disable the batch job and recreate it with a smaller number of records.

D.  

Decrease the batch size to reduce the load on the system.

Discussion 0
Question # 26

Which two are best practices when it comes to Aura component and application event handling?

Choose 2 answers

Options:

A.  

Try to use application events as opposed to component events.

B.  

Reuse the event logic in a component bundle, by putting the logic in the helper.

C.  

Use component events to communicate actions that should be handled at the application level.

D.  

Handle low-level events in the event handler and re-fire them as higher-level events.

Discussion 0
Question # 27

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?

Options:

A.  

Write a trigger on the Opportunity object and use tree sorting to sum the amount for all related child objects under the Opportunity.

B.  

Use the Streaming API to create real-time roll-up summaries.

C.  

Write a trigger on the child object and use an aggregate function to sum the amount for all related child objects under the Opportunity.

D.  

Use the Metadata API to create real-time roll-up summaries.

Discussion 0
Question # 28

Universal Containers wants to automatically assign new cases to the appropriate support representative based on the case origin. They have created a custom field on the Case object to store the support representative name.

What is the best solution to assign the case to the appropriate support representative?

Options:

A.  

Use a trigger on the Case object.

B.  

Use a formula field on the Case object.

C.  

Use a validation rule on the Case object.

D.  

Use an Assignment Flow element.

Discussion 0
Question # 29

While writing an Apex class, a developer wants to make sure that all functionality being developed is handled as specified by the requirements.

Which approach should the developer use to be sure that the Apex class is working according to specifications?

Options:

A.  

Include a savepoint and pacabase.rollback().

B.  

Include a try/catch block to the Apex class.

C.  

Run the code in an Execute Anonymous block in the Developer Console.

D.  

Create a test class to execute the business logic and run the test in the Developer Console.

Discussion 0
Question # 30

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.

Discussion 0
Get PDI dumps and pass your exam in 24 hours!

Free Exams Sample Questions