New Year Sale Special Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: scxmas70

PDII Exam Dumps - Salesforce Certified Platform Developer II ( Plat-Dev-301 )

Searching for workable clues to ace the Salesforce PDII Exam? You’re on the right place! ExamCert has realistic, trusted and authentic exam prep tools to help you achieve your desired credential. ExamCert’s PDII PDF Study Guide, Testing Engine and Exam Dumps follow a reliable exam preparation strategy, providing you the most relevant and updated study material that is crafted in an easy to learn format of questions and answers. ExamCert’s study tools aim at simplifying all complex and confusing concepts of the exam and introduce you to the real exam scenario and practice it with the help of its testing engine and real exam dumps

Go to page:
Question # 9

A developer wrote the following method to find all the test accounts in the org:

Java

public static Account[] searchTestAccounts() {

List> searchList = [FIND 'test' IN ALL FIELDS RETURNING Account(Name)];

return (Account[]) searchList[0];

}

However, the test method below fails.

Java

@isTest

public static void testSearchTestAccounts() {

Account a = new Account(name='test');

insert a;

Account [] accounts = TestAccountFinder.searchTestAccounts();

System.assert(accounts.size() == 1);

}

What should be used to fix this failing test?

A.

@isTest(SeeAllData=true) to access org data for the test9

B.

Test.loadData to set up expected data10

C.

Test.setFixedSearchResults() method to set up expected data11

D.

@testSetup method to set up expected data12

Full Access
Question # 10

A developer is tasked with creating a Lightning web component that allows users to create a Case for a selected product, directly from a custom Lightning page. The input fields in the component are displayed in a non-linear fashion on top of an image of the product to help the user better understand the meaning of the fields. Which two components should a developer use to implement the creation of the Case from the Lightning web component?161718

A.

lightning-record-form192021

B.

lightning-record-edit-form222324

C.

lightnin25g-input-field2627

D.

lightning-input2829

Full Access
Question # 11

A developer created the following test method:

Java

@isTest(SeeAllData= true)

public static void testDeleteTrigger(){

Account testAccount = new Account(name = 'Test1');

insert testAccount;

List testAccounts = [SELECT Id, Name from Account WHERE Name like 'Test%'];

System.assert(testAccounts.size() > 0);

delete testAccounts;

testAccounts = [SELECT Id, Name from Account WHERE Name like 'Test%'];

System.assert(testAccounts.size() == 0);

}

The developer org has five accounts where the name starts with "Test". The developer executes this test in the Developer Console.

After the test code runs, which statement is true?

A.

There will be five accounts where the name starts with "Test".

B.

There will be no accounts where the name starts with "Test".

C.

There will be six accounts where the name starts with "Test".

D.

The test will fail.

Full Access
Question # 12

A company notices that their unit tests in a test class with many methods to create many records for prerequisite reference data are slow. What can a developer do to address the issue?

A.

Turn off triggers, flows, and validations when running tests.

B.

Move the prerequisite reference data setup to the constructor for the test class.

C.

Move the prerequisite reference data setup to a @testSetup method in the test class.

D.

Move the prerequisite reference data setup to a TestDataFactory and call that from each test method.

Full Access
Question # 13

A developer is trying to access org data from within a test class. Which sObject type requires the test class to have the (seeAllData=true) annotation?

A.

RecordType

B.

Report

C.

User

D.

Profile

Full Access
Question # 14

An Apex trigger creates an Order__c record every time an Opportunity is won by a Sales Rep. Recently the trigger is creating two orders. What is the optimal technique for a developer to troubleshoot this?

A.

Disable all flows, and then re-enable them one at a time to see which one causes the error.

B.

Set up debug logging for every Sales Rep, then monitor the logs for errors and exceptions.

C.

Run the Apex Test Classes for the Apex trigger to ensure the code still has sufficient code coverage.

D.

Add system.debug() statements to the code and use the Developer Console logs to trace the code.

Full Access
Question # 15

There is an Apex controller and a Visualforce page in an org that displays records with a custom filter consisting of a combination of picklist values selected by the user. The page takes too long to display results for some of the input combinations, while for other input choices it throws the exception, "Maximum view state size limit exceeded". What step should the developer take to resolve this issue?

A.

Adjust any code that filters by picklist values since they are not indexed.

B.

Remove instances of the transient keyword from the Apex controller to avoid the view state error.

C.

Split the layout to filter records in one Visualforce page and display the list of records in a second page using the same Apex controller.

D.

Use a StandardSetController or SOQL LIMIT in the Apex controller to limit the number of records displayed at a time.

Full Access
Question # 16

Universal Containers develops a Visualforce page that requires the inclusion of external JavaScript and CSS files. They want to ensure efficient loading and caching of the page. Which feature should be utilized to achieve this goal?

A.

Static resources

B.

@RemoteAction

C.

<apex:pageBlockTable>

D.

<apex:actionFunction>

Full Access
Go to page: