Salesforce PDI Exam (page: 10)
Salesforce Certified Platform Developer I
Updated on: 01-Aug-2025

Viewing Page 10 of 77

While writing a test class that covers an OpportunityLineItem trigger, a Developer is unable to create a standard PriceBook since one already exists in the org.
How should the Developer overcome this problem?

  1. Use Test.getStandardPricebookId() to get the standard PriceBook ID.
  2. Use @IsTest(SeeAllData=true) and delete the existing standard PriceBook.
  3. Use Test.loadData() and a Static Resource to load a standard Pricebook.
  4. Use @TestVisible to allow the test method to see the standard PriceBook.

Answer(s): A



Why would a developer consider using a custom controller over a controller extension?

  1. To increase the SOQL query governor limits.
  2. To implement all of the logic for a page and bypass default Salesforce functionality
  3. To leverage built-in functionality of a standard controller
  4. To enforce user sharing settings and permissions

Answer(s): B



Which two platform features align to the Controller portion of MVC architecture? (Choose two.)

  1. Process Builder actions
  2. Workflow rules
  3. Standard objects
  4. Date fields

Answer(s): A,B



A developer needs to test an Invoicing system integration. After reviewing the number of transactions required for the test, the developer estimates that the test data will total about 2 GB of data storage. Production data is not required for the integration testing.
Which two environments meet the requirements for testing? (Choose two.)

  1. Developer Sandbox
  2. Full Sandbox
  3. Developer Edition
  4. Partial Sandbox
  5. Developer Pro Sandbox

Answer(s): B,D



How should a developer create a new custom exception class?

  1. public class CustomException extends Exception{}
  2. CustomException ex = new (CustomException)Exception();
  3. public class CustomException implements Exception{}
  4. (Exception)CustomException ex = new Exception();

Answer(s): A



Viewing Page 10 of 77



Share your comments for Salesforce PDI exam with other users:

TestPD1 8/10/2023 12:22:00 PM

question 18 : response isnt a ?
EUROPEAN UNION


TestPD1 8/10/2023 12:19:00 PM

question 17 : responses arent b and c ?
EUROPEAN UNION