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

Viewing Page 12 of 77

When is an Apex Trigger required instead of a Process Builder Process?

  1. When a record needs to be created
  2. When multiple records related to the triggering record need to be updated
  3. When a post to Chatter needs to be created
  4. When an action needs to be taken on a delete or undelete, or before a DML operation is executed.

Answer(s): D



How should a developer avoid hitting the governor limits in test methods?

  1. Use @TestVisible on methods that create records.
  2. Use Test.loadData() to load data from a static resource.
  3. Use @IsTest (SeeAllData=true) to use existing data.
  4. Use Test.startTest() to reset governor limits.

Answer(s): D



A developer encounters APEX heap limit errors in a trigger.
Which two methods should the developer use to avoid this error? (Choose two.)

  1. Use the transient keyword when declaring variables.
  2. Query and store fields from the related object in a collection when updating related objects.
  3. Remove or set collections to null after use.
  4. Use SOQL for loops instead of assigning large queries results to a single collection and looping through the collection.

Answer(s): A,D



A lead object has a custom field Prior_Email__c. The following trigger is intended to copy the current Email into the Prior_Email__c field any time the Email field is changed:

Which type of exception will this trigger cause?

  1. A null reference exception
  2. A compile time exception
  3. A DML exception
  4. A limit exception when doing a bulk update

Answer(s): C



A Visualforce page is required for displaying and editing Case records that includes both standard and custom functionality defined in an Apex class called myControllerExtension.
The Visualforce page should include which <apex:page> attribute(s) to correctly implement controller functionality?

  1. controller="Case" and extensions="myControllerExtension"
  2. extensions="myControllerExtension"
  3. controller="myControllerExtension"
  4. standardController="Case" and extensions="myControllerExtension"

Answer(s): D



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