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

Exact2Pass Menu

Salesforce Certified Platform Developer II ( Plat-Dev-301 )

Last Update 8 hours ago Total Questions : 161

The Salesforce Certified Platform Developer II ( Plat-Dev-301 ) content is now fully updated, with all current exam questions added 8 hours ago. Deciding to include PDII practice exam questions in your study plan goes far beyond basic test preparation.

You'll find that our PDII exam questions frequently feature detailed scenarios and practical problem-solving exercises that directly mirror industry challenges. Engaging with these PDII sample sets allows you to effectively manage your time and pace yourself, giving you the ability to finish any Salesforce Certified Platform Developer II ( Plat-Dev-301 ) practice test comfortably within the allotted time.

Question # 41

Consider the Apex class below that defines a RemoteAction used on a Visualforce search page.

Java

global with sharing class MyRemoter {

public String accountName { get; set; }

public static Account account { get; set; }

public MyRemoter() {}

@RemoteAction

global static Account getAccount(String accountName) {

account = [SELECT Id, Name, NumberOfEmployees FROM Account WHERE Name = :accountName];

return account;

}

}

Which code snippet will assert that the remote action returned the correct Account?

A.

Java

MyRemoter remote = new MyRemoter();

Account a = remote.getAccount( ' TestAccount ' );

System.assertEquals( ' TestAccount ' , a.Name );

B.

Java

MyRemoter remote = new MyRemoter( ' TestAccount ' );

Account a = remote.getAccount();

System.assertEquals( ' TestAccount ' , a.Name );

C.

Java

Account a = controller.getAccount( ' TestAccount ' );

System.assertEquals( ' TestAccount ' , a.Name );

D.

Java

Account a = MyRemoter.getAccount( ' TestAccount ' );

System.assertEquals( ' TestAccount ' , a.Name );

Question # 42

Which tag should a developer use to display different text while an < apex:commandButton > is processing an action?

A.

< apex:actionStatus >

B.

< apex:actionPoller >

C.

< apex:pageMessages >

D.

< apex:actionSupport >

Question # 43

Consider the queries in the options below and the following information:

    For these queries, assume that there are more than 200,000 Account records.

    These records include soft-deleted records in the Recycle Bin.

    There are two fields marked as External Id: Customer_Number__c and ERP_Key__c.

Which two queries are optimized for large data volumes?

A.

SELECT Id FROM Account WHERE Name != ' ' AND Customer_Number__c = ' ValueA '

B.

SELECT Id FROM Account WHERE Name != ' ' AND IsDeleted = false

C.

SELECT Id FROM Account WHERE Name != NULL

D.

SELECT Id FROM Account WHERE Id IN :aListVariable

Question # 44

A query using OR between a Date and a RecordType is performing poorly in a Large Data Volume environment. How can the developer optimize this?

A.

Break down the query into two individual queries and join the two result sets.

B.

Annotate the method with the @Future annotation.

C.

Use the Database.querySelector method to retrieve the accounts.

D.

Create a formula field to combine the CreatedDate and RecordType value, then filter based on the formula.

Question # 45

Which statement is considered a best practice for writing bulk safe Apex triggers?

A.

Add LIMIT 50000 to every SOQL statement.

B.

Add records to collections and perform DML operations against these collections.

C.

Use the Database methods with allOrNone set to false instead of DML statements.

D.

Perform all DML operations from within a future method.

Question # 46

Business rules require a Contact to always be created when a new Account is created. What can be used when developing a custom screen to ensure an Account is not created if the creation of the Contact fails?

A.

Use setSavePoint() and rollback() with a try-catch block.

B.

Use a Database Savepoint method with a try-catch block.

C.

Use the Database.Insert method with allOrNone set to false.

D.

Use the Database.Delete method if the Contact insertion fails.

Question # 47

A developer creates an application event that has triggered an infinite loop. What may have caused this problem?

A.

The event has multiple handlers registered in the project.

B.

The event is fired from a custom renderer.

C.

An event is fired ' ontouched ' and is unhandled.

D.

The event handler calls a trigger.

Question # 48

A developer has a test class that creates test data before making a mock callout but now receives a " You have uncommitted work pending. Please commit or rollback before calling out " error. Which step should be taken to resolve the error?

A.

Ensure both the insertion and mock callout occur after the Test.stopTest().1

B.

Ensure the records are inserted before the Test.startTest() statement and the mock callout occurs within a method annotated with @testSetup.2

C.

Ensure the records are inserted befo3re the Test.startTest() statement and the mock callout occurs after the Test.startTest().45

D.

Ensure both the insertion and mock callout occur after the Test.startTest().67

Go to page: