Spring Sale 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: Board70

PDII Exam Dumps - Salesforce Developers Questions and Answers

Question # 24

A developer created and tested a Visualforce page in their developer sandbox, but now receives reports that users encounter "View State" errors when using it in production. What should the developer ensure to correct these errors?

Options:

A.

Ensure profiles have access to the Visualforce page.

B.

Ensure properties are marked as private.

C.

Ensure variables are marked as transient.12

D.

Ensure queries do not exceed governor limits.34

Buy Now
Question # 25

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?

Options:

A.

Static resources

B.

@RemoteAction

C.

D.

Buy Now
Question # 26

A developer is building a Lightning web component that retrieves data from Salesforce and assigns it to the record property:

JavaScript

import { LightningElement, api, wire } from 'lwc';

import { getRecord } from 'lightning/uiRecordApi';

export default class Record extends LightningElement {

@api fields;

@api recordId;

record;

}

What must be done in the component to get the data from Salesforce?

Options:

A.

Add @api(getRecord, { recordId: '$recordId' }) above record.

B.

Add @wire(getRecord, { recordId: '$recordId' }) above record.

C.

Add @api(getRecord, { recordId: '$recordId', fields: '$fields' }) above record.

D.

Add @wire(getRecord, { recordId: '$recordId', fields: '$fields' }) above record.

Buy Now
Question # 27

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?

Options:

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.

Buy Now
Question # 28

Which technique can run custom logic when a Lightning web component is loaded?

Options:

A.

Use an init event to call a function.

B.

Use the connectedCallback() method.

C.

Use the renderedCallback() method.

D.

Call $A.enqueueAction and pass in the method to call.

Buy Now
Question # 29

Part of a custom Lightning component displays the total number of Opportunities in the org, which are in the millions. The Lightning component uses an Apex method to get the data it needs. What is the optimal way for a developer to get the total number of Opportunities for the Lightning component?

Options:

A.

COUNT () SOQL aggregate query on the Opportunity object

B.

Apex batch job that counts the number of Opportunity records

C.

SUM () SOQL aggregate query on the Opportunity object

D.

SOQL for loop that counts the number of Opportunities records

Buy Now
Question # 30

Refer to the code snippet below:

Java

public static void updateCreditMemo(String customerId, Decimal newAmount){

List toUpdate = new List();

for(Credit_Memo__c creditMemo : [Select Id, Name, Amount__c FROM Credit_Memo__c WHERE Customer_Id__c = :customerId LIMIT 50]) {

creditMemo.Amount__c = newAmount;

toUpdate.add(creditMemo);

}

Database.update(toUpdate,false);

}

A custom object called Credit_Memo__c exists in a Salesforce environment. As part of a new feature development, the developer needs to ensure race conditions are prevented when a set of records are mod1ified within an Apex transaction. In the preceding Apex code, how can the developer alter the que2ry statement to use SOQL features to prevent race conditions within a tr3ansaction?4

Options:

A.

[Select Id, Name, Amount__c FROM Credit_Memo__c WHERE Customer_Id__c = :customerId LIMIT 50 FOR UPDATE]

B.

[Select Id, Name, Amount__c FROM Credit_Memo__c WHERE Customer_Id__c = :customerId USING SCOPE LIMIT 50]

C.

[Select Id, Name, Amount__c FROM Credit_Memo__c WHERE Customer_Id__c = :customerId LIMIT 50 FOR REFERENCE]

D.

[Select Id, Name, Amount__c FROM Credit_Memo__c WHERE Customer_Id__c = :customerId LIMIT 50 FOR VIEW]

Buy Now
Question # 31

A company recently deployed a Visualforce page with a custom controller that has a data grid of information about Opportunities in the org. Users report that they receive a "Maximum view state size limit" error message under certain conditions. According to Visualforce best practice, which three actions should the developer take to reduce the view state?

Options:

A.

Use the transient keyword in the Apex controller for variables that do not maintain state.

B.

Use the private keyword in the controller for variables.1415

C.

Use the final keyword in the controller for variables that will not change.1617

D.

Use filters and pagination to reduce the amount of data.1819

E.

Refine any SOQL queries to return only data relevant to the page.2021

Buy Now
Question # 32

Universal Containers needs to integrate with their own, existing, internal custom web application. The web application accepts JSON payloads, resizes product images, and sends the resized images back to Salesforce. What should the developer use to implement this integration?

Options:

A.

An Apex trigger that calls an @future method that allows callouts910

B.

A flow that calls an @future method that allows callouts1112

C.

A flow with an outbound message that contains a session ID1314

D.

A platform event that makes a callout to the web application1516

Buy Now
Question # 33

A developer created an Opportunity trigger that updates the account rating when an associated opportunity is considered high value. Current criteria for an opportunity to be considered high value is an amount greater than or equal to $1,000,000. However, this criteria value can change over time. There is a new requirement to also display high value opportunities in a Lightning web component. Which two actions should the developer take to meet these business requirements, and also prevent the business logic that obtains the high value opportunities from being repeated in more than one place?2021

Options:

A.

L22eave the business logic code inside the trigger for efficiency.23

B.

Use custom metadata to hold the high value amount.24

C.

Call the trigger from the Lightning web25 component.

D.

Create a helper class that fetches the high value opportunities.

Buy Now
Exam Code: PDII
Exam Name: Salesforce Certified Platform Developer II ( Plat-Dev-301 )
Last Update: Feb 20, 2026
Questions: 161
PDII pdf

PDII PDF

$25.5  $84.99
PDII Engine

PDII Testing Engine

$28.5  $94.99
PDII PDF + Engine

PDII PDF + Testing Engine

$40.5  $134.99