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

Free Salesforce Certified Platform Developer II ( Plat-Dev-301 ) Practice Questions

Exams4sure Dumps

Exam style questions across every PDII domain

Last Update 3 days ago
Total Questions : 161

Start with our free PDII practice questions, carefully crafted to mirror the domains, phrasing, and difficulty of the real Developers exam. Each PDII exam question comes with a detailed rationale that explains not just which answer is correct but why the others fall short. That's how concepts stick. Use the free set to benchmark yourself: identify your Salesforce weak domains, see where you're losing marks, and build a focused study plan in minutes.

PDII PDF

PDII PDF (Printable)
$54.25
$154.99

PDII Testing Engine

PDII PDF (Printable)
$59.5
$169.99

PDII PDF + Testing Engine

PDII PDF (Printable)
$74.55
$212.99
Question # 21

How should a developer reference a third-party JavaScript library from a Lightning component?

Options:

A.  

From an asset file

B.  

From a document

C.  

From a static resource

D.  

From a third-party URL

Discussion 0
Question # 22

A Page throws an Attempt to dereference a null object error for a Contact. What change In the controller will fix the error?

Options:

A.  

Declare a static final Contact at the top of the controller.

B.  

Change the setters signature to return a Contact.

C.  

Use a condition in the getter to return a new Contact if it is null.

D.  

Change the getter's signature to be static Contact.

Discussion 0
Question # 23

Consider the following code snippet:

Question # 23

As part of the deployment cycle, a developer creates the following test class:

When the test class runs, the assertion fails.

Which charge should the developer implement in the Apex test method to ensure the test method execute successfully?

Options:

A.  

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

B.  

Add System.runAs (User) to line 14 and enclose line 14 within Test.startTest() and Test.stoptest ().

C.  

Query the Administrator user into memory and enclose lines 14 and 15 within the System,runAs (user)

method.

D.  

Add @IsTest(seeAllData=True) to line 12 and enclose lines 14 and 15 within Test.startTest () and test.stopTest()

Discussion 0
Question # 24

Consider the following code snippet:

Question # 24

Which two steps should the developer take to add flexibility to change the endpolnt and credentials without needing to modify code?

Choose 2 answers

Options:

A.  

Create a Named Credential, endPoint_NC, to store the endpoint and credentials.

B.  

Store the URL of the endpoint in a custom Label named endPointURL.

C.  

Use req.setEndpoint(,callcut:endPoint_NC,); within the callout request.

D.  

Use req.setEndpoint(Label.endPointURL);.

Discussion 0
Question # 25

Universal containers needs to integrate with several external systems. The process is initiated when a record is created in Salesforce. The remote systems do not require Salesforce to wait for a response before continuing.

What is the recommended best solution to accomplish this?

Options:

A.  

Trigger with callout

B.  

Platform event

C.  

PushTopic event

D.  

Outbound message

Discussion 0
Question # 26

A developer created and tested a Visualforce page in their developer sandbox, but now receives reports that users are encountering ViewState errors when using it in Production. What should the developer ensure to correct these errors?

Options:

A.  

Ensure queries do not exceed governor limits.

B.  

Ensure variables are marked as Transient.

C.  

Ensure properties are marked as private.

D.  

Ensure profiles have access to the Visualforce page.

Discussion 0
Question # 27

An Apex trigger creates a Contract record every time an Opportunity record is marked as Closed and Won. This trigger is working great, except (due to a recent acquisition) Opportunity records need to be loaded into the Salesforce instance.

When a test batch of records are loaded, the Apex trigger creates Contract records. A developer is tasked with preventing Contract records from being created when mass Loading the Opportunities, but the daily users still need to have the Contract records created.

What is the most extendable way to update the Apex trigger to accomplish this?

Options:

A.  

Add a validation rule to the Contract to prevent Contract creation by the user who loads the data.

B.  

Add the Profile ID of the user who loads the data to the trigger, so the trigger will not fire for this user.

C.  

Use a list custom setting to disable the trigger for the user who loads the data.

D.  

Use a hierarchy custom setting to skip executing the logic inside the trigger for the user who loads the data.

Discussion 0
Question # 28

A company has a Lightning Page with many Lightning Components, some that cache reference data. It is reported that the page does not always show the most current reference data. What can a developer use to analyze and diagnose the problem in the Lightning Page?

Options:

A.  

Salesforce Lightning Inspector Storage Tab

B.  

Salesforce Lightning Inspector Actions Tab

C.  

Salesforce Lightning Inspector Event Log Tab

D.  

Salesforce Lightning Inspector Transactions Tab

Discussion 0
Question # 29

Users upload .csv files in an external system to create account and contact records in Salesforce. Up to 200 records can be created at a time. The users need to wait for a response from Salesforce in the external system, but the data does not need to synchronize between the two systems.

Based on these requirements, which method should a developer use to create the records in Salesforce?

Options:

A.  

REST API request using composite/vbatch/

B.  

REST API request using composite/tree/

C.  

Apex web services

D.  

Bulk API 2.0

Discussion 0
Question # 30

A developer is trying to decide between creating a Visualforce component or a Lightning component for a custom screen.

Which functionality consideration impacts the final decision?

Options:

A.  

Does the screen need to be accessible from the lightning Experience UI?

B.  

Will the screen make use of a JavaScript framework?

C.  

Does the screen need to be rendered as a PDF without using a third-party application?

D.  

Will the screen be accessed via a mobile app?

Discussion 0

Free Exams Sample Questions