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

Salesforce Updated PDI Exam Questions and Answers by bernie

Page: 5 / 15

Salesforce PDI Exam Overview :

Exam Name: Salesforce Certified Platform Developer (Plat-Dev-201)
Exam Code: PDI Dumps
Vendor: Salesforce Certification: Developers
Questions: 204 Q&A's Shared By: bernie
Question 20

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
Question 21

A developer must troubleshoot to pinpoint the causes of performance issues when a custom page loads in their org.

Which tool should the developer use to troubleshoot query performance?

Options:

A.

Setup Menu

B.

Visual Studio Code IDE

C.

AppExchange

D.

Developer Console

Discussion
Question 22

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

Options:

A.

View the code coverage percentage for the class using the Overall Code Coverage panel in the Developer Console Tests tab.

B.

View the Class Test Percentage tab on the Apex Class list view in Salesforce Setup.

C.

Select and run the class on the Apex Test Execution page in the Developer Console.

D.

View the Code Coverage column in the list view an the Apex Classes page.

Discussion
Question 23

What are two benefits of using External IDs?

Choose 2 answers

Options:

A.

An External ID field can be used to reference an ID from another external system.

B.

An External ID can be a formula field ta help create a unique key from two fields in Salesforce.

C.

An External ID can be used with Salesforce Mobile to make external data visible.

D.

An External 1D is indexed and can improve the performance of SOOL queries.

Discussion
Ava-Rose
Yes! Cramkey Dumps are amazing I passed my exam…Same these questions were in exam asked.
Ismail Jul 14, 2025
Wow, that sounds really helpful. Thanks, I would definitely consider these dumps for my certification exam.
Rae
I tried using Cramkey dumps for my recent certification exam and I found them to be more accurate and up-to-date compared to other dumps I've seen. Passed the exam with wonderful score.
Rayyan Jul 19, 2025
I see your point. Thanks for sharing your thoughts. I might give it a try for my next certification exam.
Elise
I've heard that Cramkey is one of the best websites for exam dumps. They have a high passing rate and the questions are always up-to-date. Is it true?
Cian Jul 3, 2025
Definitely. The dumps are constantly updated to reflect the latest changes in the certification exams. And I also appreciate how they provide explanations for the answers, so I could understand the reasoning behind each question.
Mylo
Excellent dumps with authentic information… I passed my exam with brilliant score.
Dominik Jul 15, 2025
That's amazing! I've been looking for good study material that will help me prepare for my upcoming certification exam. Now, I will try it.
Melody
My experience with Cramkey was great! I was surprised to see that many of the questions in my exam appeared in the Cramkey dumps.
Colby Jul 9, 2025
Yes, In fact, I got a score of above 85%. And I attribute a lot of my success to Cramkey's dumps.
Page: 5 / 15

PDI
PDF

$42  $104.99

PDI Testing Engine

$50  $124.99

PDI PDF + Testing Engine

$66  $164.99