Go Back on PDII Exam
Available in 1, 3, 6 and 12 Months Free Updates Plans
PDF: $15 $60

Test Engine: $20 $80

PDF + Engine: $25 $99

PDII Practice Test


Page 1 out of 39 Pages

Universal Containers develops a Salesforce application that requires frequent interaction with an external REST API. To avoid duplicating code and improve maintainability, how should they implement the API integration for code reuse?


A.

Use a separate Apex class for each API endpoint to encapsulate the integration logic.


B.

Include the API integration code directly in each Apex class that requires it.


C.

Create a reusable Apex class for the API integration and invoke it from the relevant Apex classes.


D. Store the API integration code as a static resource and reference it in each Apex class.





C.
  
Create a reusable Apex class for the API integration and invoke it from the relevant Apex classes.



Universal Containers uses Salesforce to track orders in an order__c object. The order = object has private organization-wide defaults. The order = object has a custom field, Quality_Controller_c, that is a Lookup to User and is used to indicate that the specified User is performing quality control on the order_ co. What should be used to automatically give read only access to the User set in the Quality_Controller field?


A.

Record ownership


B.

Criteria-based sharing


C.

Apex managed sharing


D. User managed sharing





D.
  User managed sharing

A Visualforce page needs to make a callout to get billing information and tax information from two different REST endpoints. The information needs to be displayed to the user at the same time and the return value of the billing information contains the input for the tax information callout. Each endpoint might take up to two minutes to process. How should a developer implement the callouts?


A.

An HTTP REST callout for the billing callout and a Continuation for the tax callout


B.

A Continuation for both the billing callout and the tax callout


C.

An HTTP REST callout for both the billing callout and the tax callout


D. A Continuation for the billing callout and an HTTP REST callout for the tax callout





B.
  
A Continuation for both the billing callout and the tax callout



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?


A. Use Queueable Apex to chain the jobs to run sequentially.


B. Use Apex Scheduler to schedule each process.


C. Use multiple 3zutuze methods for each process and callout.


D. Use Limits class to stop entire process once governor limits are reached.





A.
  Use Queueable Apex to chain the jobs to run sequentially.

A developer is building a complex commission calculation engine in Apex that is called from an Opportunity trigger. During QA it was reported that the calculations are incorrect. The developer has representative test data and passing test methods in their developer sandbox. Which three tools or techniques could the developer use to execute the code and pause it at key lines to visually inspect values of various Apex variables? (Choose 3 answers)


A. Apex Interactive Debugger


B. Workbench


C. Developer Console


D. Breakpoints


E. Apex Replay Debugger





A.
  Apex Interactive Debugger

C.
  Developer Console

E.
  Apex Replay Debugger




Explanation:

To debug and troubleshoot the commission calculation engine, a developer can use several tools provided by Salesforce to inspect and pause the execution of Apex code.

Apex Interactive Debugger: It allows real-time debugging of Apex code execution. With this tool, a developer can set breakpoints, step through code, inspect variables, and evaluate expressions.

Developer Console: Although the Developer Console does not allow interactive debugging, it does provide the ability to view logs that capture the execution of code. Debug logs can be inspected to understand the flow of execution and values of variables at different points in time.

Apex Replay Debugger: This tool is part of Salesforce Extensions for Visual Studio Code. It allows a developer to replay a debug log as if they are stepping through the code line by line, which can be very useful to inspect the state of variables at specific points in the execution.


Page 1 out of 39 Pages