PDI Practice Test Questions

236 Questions


Which three data types can a SOQL query return? Choose 3 answers


A. List


B. Long


C. Integer


D. sObJect


E. Double





A.
  List

C.
  Integer

D.
  sObJect

Universal Containers has an order system that uses an Order Number to identify an order for customers and service agents. Order records will be imported into Salesforce. How should the Order Number field be defined in Salesforce?


A. Direct Lookup


B. External ID and Unique


C. Lookup


D. Indirect Lookup





B.
  External ID and Unique

A developer is asked to write helper methods that create test data for unit tests.


What should be changed in the Testvtils class so that its methods are only usable by unit test methods?


A. Change public to private on line 01.


B. Add @IsTest above line 03,


C. Add @IsTest above line 01.


D. Remove static from line 03.





B.
  Add @IsTest above line 03,

A developer considers the following snippet of code:


Based on this code, what is the value of x?


A. 3


B. 1


C. 4


D. 2





C.
  4

A lead developer creates an Apex interface called "Laptop". Consider the following code snippet:

How can a developer use the Laptop Interface within the Silvertaptop class?


A. @Extends(class=Laptop'') public class SilverLaptop


B. public calss SilverLaptop extends Laptop


C. @Interface (class=''Laptop'') public class SilverLaptop


D. public class Silverlaptop implements Laptop





B.
  public calss SilverLaptop extends Laptop

Which three resources in an Aura component can contain JavaScript functions? Choose 3 answers


A. Renclerer


B. Style


C. Helper


D. Controller


E. Design





A.
  Renclerer

C.
  Helper

D.
  Controller

Which code displays the contents of a Visualforce page as a PDF?


A. Option A


B. Option B


C. Option C


D. Option D





C.
  Option C

A software company uses the following objects and relationships:
• Case: to handle customer support issues
• Defect_c: a custom object to represent known issues with the company's software
• case_Defect c: a junction object between Case and Defector to represent that a defect Is a customer issue
What should be done to share a specific Case-Defect_c record with a user?


A. Share the Case_Defect_c record.


B. Share the parent Case record.


C. Share the parent Defect_c record.


D. Share the parent Case and Defect_c records.





D.
  Share the parent Case and Defect_c records.

A developer has identified a method in an Apex class that performs resource intensive actions in memory by iterating over the result set of a SOQL statement on the account. The method also performs a DML statement to save the changes to the datadase. Which two techniques should the developer implement as a best practice to ensure transaction control and avoid exceeding governor limits? Choose 2 answers


A. Use partial DML statements to ensure only valid data is committed.


B. Use the System,Limit classto monitor the current CPU governor limit consumption.


C. Use the Database,Savepoint method to enforce database integrity.


D. Use the Reedonly annotation to bypass the number of rows returned by a SOQL.





B.
  Use the System,Limit classto monitor the current CPU governor limit consumption.

C.
  Use the Database,Savepoint method to enforce database integrity.

What should a developer do to check the code coverage of a class after running all tests?


A. View the Code Coverage column in the list view on the Apex Classes page.


B. View the Class Test Percentage tab on the Apex Class fist view m Salesforce Setup.


C. View Use cede coverage percentage for the class using the Overall Code Coverage panel in the Developer Console Tests tab.


D. Select and run the class on the Apex Test Execution page in the Developer Console.





B.
  View the Class Test Percentage tab on the Apex Class fist view m Salesforce Setup.

A developer created a trigger on the Account object. While testing the trigger, the developer sees the error message 'Maximum trigger depth exceeded’, What could be the possible causes?


A. The developer does not have the correct user permission.


B. The trigger is getting executed multiple times.


C. The trigger is a a helper class.


D. The trigger does not have sufficient code coverage.





B.
  The trigger is getting executed multiple times.

What should be used to create scratch orgs?


A. Developer Console


B. Salesforce CLI


C. Workbench


D. Sandbox refresh





B.
  Salesforce CLI


Page 7 out of 20 Pages
Previous