
Salesforce Platform Developer II - PDII Exam Questions
QUESTION NO: 1
Millions of Accounts are updated every quarter from an external system. What is the optimal way to update these in Salesforce?
Millions of Accounts are updated every quarter from an external system. What is the optimal way to update these in Salesforce?
Correct Answer: B
Explanation: Only visible for Pass4Test members. You can sign-up / login (it's free).
QUESTION NO: 2
A Lightning web component exists in the system and displays information about the record in context as a modal. Salesforce administrators need to use this component within the Lightning App Builder. Which two settings should the developer configure within the xml resource file?
A Lightning web component exists in the system and displays information about the record in context as a modal. Salesforce administrators need to use this component within the Lightning App Builder. Which two settings should the developer configure within the xml resource file?
Correct Answer: C,D
Explanation: Only visible for Pass4Test members. You can sign-up / login (it's free).
QUESTION NO: 3
Universal Containers has an Apex trigger on Account that creates an Account Plan record when an Account is marked as a Customer. Recently a record-triggered flow was added to update a date field. Since the addition of the flow, two Account Plan records are created. What might cause this to happen?
Universal Containers has an Apex trigger on Account that creates an Account Plan record when an Account is marked as a Customer. Recently a record-triggered flow was added to update a date field. Since the addition of the flow, two Account Plan records are created. What might cause this to happen?
Correct Answer: A
Explanation: Only visible for Pass4Test members. You can sign-up / login (it's free).
QUESTION NO: 4
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?
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?
Correct Answer: B
Explanation: Only visible for Pass4Test members. You can sign-up / login (it's free).
QUESTION NO: 5
A developer wrote an Apex class to make several callouts to an external system. If the URLs used in these callouts will change often, which feature should the developer use to minimize changes needed to the Apex class?
A developer wrote an Apex class to make several callouts to an external system. If the URLs used in these callouts will change often, which feature should the developer use to minimize changes needed to the Apex class?
Correct Answer: D
Explanation: Only visible for Pass4Test members. You can sign-up / login (it's free).
QUESTION NO: 6
A company has an Apex process that makes multiple extensive database operations and web service callouts.
The database processes and web services can take a long time to run and must be run sequentially. How should the developer write this Apex code without running into governor limits and system limitations?123
A company has an Apex process that makes multiple extensive database operations and web service callouts.
The database processes and web services can take a long time to run and must be run sequentially. How should the developer write this Apex code without running into governor limits and system limitations?123
Correct Answer: C
Explanation: Only visible for Pass4Test members. You can sign-up / login (it's free).
QUESTION NO: 7
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?
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?
Correct Answer: B,D
Explanation: Only visible for Pass4Test members. You can sign-up / login (it's free).
QUESTION NO: 8
A developer notices the execution of all the test methods in a class takes a long time to run, due to the initial setup of all the test data that is needed to perform the tests. What should the developer do to speed up test execution?
A developer notices the execution of all the test methods in a class takes a long time to run, due to the initial setup of all the test data that is needed to perform the tests. What should the developer do to speed up test execution?
Correct Answer: A
Explanation: Only visible for Pass4Test members. You can sign-up / login (it's free).
QUESTION NO: 9
A developer is inserting, updating, and deleting multiple lists of records in a single transaction and wants to ensure that any error prevents all execution. How should the developer implement error exception handling in their code to handle this?1234567
A developer is inserting, updating, and deleting multiple lists of records in a single transaction and wants to ensure that any error prevents all execution. How should the developer implement error exception handling in their code to handle this?1234567
Correct Answer: C
Explanation: Only visible for Pass4Test members. You can sign-up / login (it's free).
QUESTION NO: 10
A developer creates a lightning web component to allow a Contact to be quickly entered. However, error messages are not displayed.
HTML
<template>
<lightning-record-edit-form object-api-name="Contact">
<lightning-input-field field-name="FirstName"></lightning-input-field>
<lightning-input-field field-name="LastName"></lightning-input-field>
<lightning-input-field field-name="Email"></lightning-input-field>
<lightning-button type="submit" name="submit" label="Create Contact">
</lightning-button>
</lightning-record-edit-form>
</template>
Which component should the developer add to the form to display error messages?12
A developer creates a lightning web component to allow a Contact to be quickly entered. However, error messages are not displayed.
HTML
<template>
<lightning-record-edit-form object-api-name="Contact">
<lightning-input-field field-name="FirstName"></lightning-input-field>
<lightning-input-field field-name="LastName"></lightning-input-field>
<lightning-input-field field-name="Email"></lightning-input-field>
<lightning-button type="submit" name="submit" label="Create Contact">
</lightning-button>
</lightning-record-edit-form>
</template>
Which component should the developer add to the form to display error messages?12
Correct Answer: B
Explanation: Only visible for Pass4Test members. You can sign-up / login (it's free).
QUESTION NO: 11
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?
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?
Correct Answer: A,D,E
Explanation: Only visible for Pass4Test members. You can sign-up / login (it's free).
QUESTION NO: 12
A developer sees test failures in the sandbox but not in production. No code or metadata changes have been actively made to either environment since the sandbox was created. Which consideration should be checked to resolve the issue?
A developer sees test failures in the sandbox but not in production. No code or metadata changes have been actively made to either environment since the sandbox was created. Which consideration should be checked to resolve the issue?
Correct Answer: C
Explanation: Only visible for Pass4Test members. You can sign-up / login (it's free).
QUESTION NO: 13
Which two queries are selective SOQL queries and can be used for a large data set of 200,000 Account records?
Which two queries are selective SOQL queries and can be used for a large data set of 200,000 Account records?
Correct Answer: C,D
Explanation: Only visible for Pass4Test members. You can sign-up / login (it's free).
QUESTION NO: 14
There are user complaints about slow render times of a custom data table within a Visualforce page that loads thousands of Account records at once. What can a developer do to help alleviate such issues?
There are user complaints about slow render times of a custom data table within a Visualforce page that loads thousands of Account records at once. What can a developer do to help alleviate such issues?
Correct Answer: A
Explanation: Only visible for Pass4Test members. You can sign-up / login (it's free).
QUESTION NO: 15
A developer created an Apex class that updates an Account based on input from a Lightning web component.
The update to the Account should only be made if it has not already been registered.
Java
account = [SELECT Id, Is_Registered__c FROM Account WHERE Id = :accountId]; if (!account.Is_Registered__c) { account.Is_Registered__c = true;
// ...set other account fields...
update account;
}
What should the developer do to ensure that users do not overwrite each other's updates to the same Account if they make updates at the same time?
A developer created an Apex class that updates an Account based on input from a Lightning web component.
The update to the Account should only be made if it has not already been registered.
Java
account = [SELECT Id, Is_Registered__c FROM Account WHERE Id = :accountId]; if (!account.Is_Registered__c) { account.Is_Registered__c = true;
// ...set other account fields...
update account;
}
What should the developer do to ensure that users do not overwrite each other's updates to the same Account if they make updates at the same time?
Correct Answer: C
Explanation: Only visible for Pass4Test members. You can sign-up / login (it's free).




