PDI Exam Questions

Total 236 Questions

Last Updated Exam : 22-Nov-2024

While developing an Apex class with custom search functionality that will be launched from a Lightning Web Component, how can the developer ensure only records accessible to the currently logged in user are displayed?


A. Option A


B. Option B


C. Option C


D. Option D





C.
  Option C

While working in a sandbox, an Apex test fails when run in the Test Runner. However, executing the Apex logic in the Execute Anonymous window succeeds with no exceptions or errors. Why did the method fail in the sandbox test framework but succeed in the Developer Console?


A. The test method has a syntax error In the code.


B. The test method does not use System. rurAs to execute as a specific user.


C. The test method Is calling an future method.


D. The test method relies on existing data in the sandbox.





D.
  The test method relies on existing data in the sandbox.

A developer Is Integrating with a legacy on-premise SQL database. What should the developer use to ensure the data being Integrated is matched to the right records in Salesforce?


A. Lookup field


B. External ID field


C. Formula field


D. External Object





B.
  External ID field

A developer has an integer variable called maxAttempts. The developer meeds to ensure that once maxAttempts is initialized, it preserves its value for the lenght of the Apex transaction; while being able to share the variable's state between trigger executions. How should the developer declare maxAttempts to meet these requirements?


A. Declare maxattempts as a member variable on the trigger definition.


B. Declare maxattempts as a private static variable on a helper class


C. Declare maxattempts as a constant using the static and final keywords


D. Declare maxattempts as a variable on a helper class





C.
  Declare maxattempts as a constant using the static and final keywords

Which action may cause triggers to fire?


A. Updates to Feed Items


B. Renaming or replacing a picklist entry


C. Changing a user's default division when the transfer division option is checked


D. Cascading delete operations





A.
  Updates to Feed Items

Which Lightning Web Component custom event property settings enable the event to bubble up the containment hierarchy and cross the Shadow DOM boundary?


A. bubbles: tnje, composed: false


B. bubbles: true, composed: true


C. bubbles: false, composed: false


D. bubbles: false, composed: true





B.
  bubbles: true, composed: true

What are three characteristics of change set deployments? Choose 3 answers


A. Change sets can only be used between related organizations.


B. Change sets can be used to transfer records.


C. Sending a change set between two orgs requires a deployment connection.


D. Change sets can deploy custom settings data.


E. Deployment is done in a one-way, single transaction.





B.
  Change sets can be used to transfer records.

C.
  Sending a change set between two orgs requires a deployment connection.

D.
  Change sets can deploy custom settings data.

A developer creates a new Apex trigger with a helper class, and writes a test class that only exercises 95% coverage of new Apex helper class. Change Set deployment to production fails with the test coverage warning: "Test coverage of selected Apex Trigger is 0%, at least 1% test coverage is required" What should the developer do to successfully deploy the new Apex trigger and helper class?


A. Create a test class and methods to cover the Apex trigger


B. Run the tests using the 'Run All Tests' method.


C. Remove the falling test methods from the est class.


D. Increase the test class coverage on the helper class





A.
  Create a test class and methods to cover the Apex trigger

A developer wants to get access to the standard price book in the org while writing a test class that covers an OpportunityLineItem trigger. Which method allows access to the price book?


A. Use Test.loadData ( )and a static resource to load a standard price book


B. Use @TestVisible to allow the test method to see the standard price book.


C. Use Test,getStandardPricebookid ( ) to get the standard price book ID.


D. Use @IsTest (SeeAllData=True) and delete the existing standard price book





C.
  Use Test,getStandardPricebookid ( ) to get the standard price book ID.

A Developer Edition org has five existing accounts. A developer wants to add 10 more accounts for testing purposes. The following code is executed in the Developer Console using the Execute Anonymous window:

How many total accounts will be in the org after this code is executed?


A. 5


B. 6


C. 10


D. 15





C.
  10


Page 13 out of 24 Pages
Previous