Salesforce PDI Exam (page: 8)
Salesforce Certified Platform Developer I
Updated on: 28-Jul-2025

Viewing Page 8 of 77

When viewing a Quote, the sales representative wants to easily see how many discounted items are included in the Quote Line Items.
What should a developer do to meet this requirement?

  1. Create a trigger on the Quote object that queries the Quantity field on discounted Quote Line Items.
  2. Create a Workflow Rule on the Quote Line Item object that updates a field on the parent Quote when the item is discounted.
  3. Create a roll-up summary field on the Quote object that performs a SUM on the quote Line Item Quantity field, filtered for only discounted Quote Line Items.
  4. Create a formula field on the Quote object that performs a SUM on the Quote Line Item Quantity field, filtered for only discounted Quote Line Items.

Answer(s): C



A developer created a Visualforce page and a custom controller with methods to handle different buttons and events that can occur on the page.
What should the developer do to deploy to production?

  1. Create a test class that provides coverage of the Visualforce page.
  2. Create a test page that provides coverage of the Visualforce page.
  3. Create a test page that provides coverage of the custom controller.
  4. Create a test class that provides coverage of the custom controller.

Answer(s): D



What are three characteristics of static methods? (Choose three.)

  1. Initialized only when a class is loaded
  2. A static variable outside of the scope of an Apex transaction
  3. Allowed only in outer classes
  4. Allowed only in inner classes
  5. Excluded from the view state for a Visualforce page

Answer(s): A,C,E



Which approach should be used to provide test data for a test class?

  1. Query for existing records in the database.
  2. Execute anonymous code blocks that create data.
  3. Use a test data factory class to create test data.
  4. Access data in @TestVisible class variables.

Answer(s): C



Which approach should a developer take to automatically add a "Maintenance Plan" to each Opportunity that includes an "Annual Subscription" when an opportunity is closed?

  1. Build a OpportunityLineItem trigger that adds a PriceBookEntry record.
  2. Build an OpportunityLineItem trigger to add an OpportunityLineItem record.
  3. Build an Opportunity trigger that adds a PriceBookEntry record.
  4. Build an Opportunity trigger that adds an OpportunityLineItem record.

Answer(s): D



Viewing Page 8 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