PDI Practice Test Questions Answers Updated 268 Questions [Q20-Q43]

4.5/5 - (451 votes)

PDI Practice Test Questions Answers Updated 268 Questions

PDI dumps & Salesforce PDI Sure Practice with 268 Questions

NEW QUESTION 20
Which statement would a developer use when creating test data for products and pricebooks?

 
 
 
 

NEW QUESTION 21
Refer to the following code that runs in an Execute Anonymous block:

 
 
 
 
 

NEW QUESTION 22
A developer is implementing an Apex class for a financial system. Within the class, the variables ‘creditAmount’ and ‘debtAmount’ should not be able to change once a value is assigned. In which two ways can the developer declare the variables to ensure their value can only be assigned one time? Choose 2 answers

 
 
 
 

NEW QUESTION 23
A Salesforce Administrator used Flow Builder to create a flow named ”accountOnboarding”. The flow must be used inside an Aura component.
Which tag should a developer use to display the flow in the component?

 
 
 
 

NEW QUESTION 24
Universal Container(UC) wants to lower its shipping cost while making the shipping process more efficient. The Distribution Officer advises UC to implement global addresses to allow multiple Accounts to share a default pickup address. The Developer is tasked to create the supporting object and relationship for this business requirement and uses the Setup Menu to create a custom object called “Global Address”. Which field should the developer ad to create the most efficient model that supports the business need?

 
 
 
 

NEW QUESTION 25
To which primitive data type in Apex is a currency field atomically assigned?

 
 
 
 

NEW QUESTION 26
A developer creates a custom controller and a custom Visualforce page by using the code block below:
public class MyController {
public String myString {
get {
if (myString == null) { myString = ‘a’;
}
return myString;
} private set; } public string getMyString (){
return ‘getMyString’;
} public string getStringMethod () {
if (myString == null) {
myString = ‘b’;
} return myString;
}
} <apex:page controller = “MyController”> {!StringMethod}, {!myString}, {!myString} </apex:page> What can the user expect to see when accessing the custom page?

 
 
 
 

NEW QUESTION 27
A developer wants to store a description of a product that can be entered on separate lines by a user during product setup and later displayed on a Visualforce page for shoppers. Which field type should the developer choose to ensure that the description will be searchable in the custom Apex SOQL queries that are written?

 
 
 
 

NEW QUESTION 28
Universal Container use a simple order Management app. On the Order Lines, the order line total is calculated by multiplying the item price with the quantity ordered. There is a Master-Detail relationship between the Order and the Order Lines object.
What is the practice to get the sum of all order line totals on the order header?

 
 
 
 

NEW QUESTION 29
A developer has the following class and trigger code:
public class InsuranceRates { public static final Decimal smokerCharge = 0.01; } trigger ContactTrigger on Contact (before insert) { InsuranceRates rates = new InsuranceRates(); Decimal baseCost = XXX; } Which code segment should a developer insert at the XXX to set the baseCost variable to the value of the class variable smokerCharge?

 
 
 
 

NEW QUESTION 30
A developer wants to display all of the available record types for a Case object. The developer also wants to display the picklist values for the Case.Status field. The Case object and the Case.Status field are on a custom Visualforce page. Which action can the developer perform to get the record types and picklist values in the controller? (Choose 2)

 
 
 
 

NEW QUESTION 31
A developer is creating a Visualforce page that allows users to create multiple Opportunities. The developer is asked to verify the current user’s default Opportunity record type, and set certain default values based on the record type before inserting the record. How can the developer find the current user’s default record type?

 
 
 
 

NEW QUESTION 32
A developer needs to write a method that searches for a phone number that could be on multiple object types.
Which method should the developer use to accomplish this task?

 
 
 
 

NEW QUESTION 33
How does the Lightning Component framework help developers implement solutions faster?

 
 
 
 

NEW QUESTION 34
Which three steps allow a custom SVG to be included in a Lightning web component? Choose 3 answers

 
 
 
 
 

NEW QUESTION 35
Universal Container(UC) wants to lower its shipping cost while making the shipping process more efficient.
The Distribution Officer advises UC to implement global addresses to allow multiple Accounts to share a default pickup address. The Developer is tasked to create the supporting object and relationship for this business requirement and uses the Setup Menu to create a custom object called “Global Address”. Which field should the developer ad to create the most efficient model that supports the business need?

 
 
 
 

NEW QUESTION 36
What should be used to create scratch orgs?

 
 
 
 

NEW QUESTION 37
The sales management team at Universal Containers requires that the Lead Source field of the Lead record be populated when a Lead is converted.
What should be used to ensure that a user populates the Lead Source field prior to converting a Lead?

 
 
 
 

NEW QUESTION 38
In order to override a standard action with a visualforce page, which attribute must be defined in the
<apex:page> tag?

 
 
 
 

NEW QUESTION 39
When a user edits the Postal Code on an Account, a custom Account text field named “Timezone” must be update based on the values in a PostalCodeToTimezone__c custom object. How should a developer implement this feature?

 
 
 
 

NEW QUESTION 40
In which order does SalesForce execute events upon saving a record?

 
 
 
 

NEW QUESTION 41
The following Apex method is part of the ContactService class that is called from a trigger: public static void setBusinessUnitToEMEA(Contact thisContact){ thisContact.Business_Unit__c = “EMEA” ; update thisContact; } How should the developer modify the code to ensure best practice are met?

 
 
 
 

NEW QUESTION 42
A developer receives an error when trying to call a global server-side method using the @remoteAction decorator.
How can the developer resolve the error?

 
 
 
 

NEW QUESTION 43
Universal Containers (UC) uses a custom object called Vendor. The Vendor custom object has a Master-Detail relationship with the standard Account object. Based on some internal discussion, the UC administrator tried to change the Master-Detail relationship to a Lookup relationship but was not able to do so. What is a possible reason that this change was not permitted?

 
 
 
 

New PDI Exam Questions| Real PDI Dumps: https://www.examslabs.com/Salesforce/Salesforce-PDI/best-PDI-exam-dumps.html