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

Viewing Page 11 of 77

What is a benefit of using an after insert trigger over using a before insert trigger?

  1. An after insert trigger allows a developer to bypass validation rules when updating fields on the new record.
  2. An after insert trigger allows a developer to insert other objects that reference the new record.
  3. An after insert trigger allows a developer to make a callout to an external service.
  4. An after insert trigger allows a developer to modify fields in the new record without a query.

Answer(s): B



A developer created a Lightning component to display a short text summary for an object and wants to use it with multiple Apex classes.
How should the developer design the Apex classes?

  1. Have each class define method getObject() that returns the sObject that is controlled by the Apex class.
  2. Extend each class from the same base class that has a method getTextSummary() that returns the summary.
  3. Have each class implement an interface that defines method getTextSummary() that returns the summary.
  4. Have each class define method getTextSummary() that returns the summary.

Answer(s): C



A Platform Developer needs to write an Apex method that will only perform an action if a record is assigned to a specific Record Type.
Which two options allow the developer to dynamically determine the ID of the required Record Type by its name? (Choose two.)

  1. Make an outbound web services call to the SOAP API.
  2. Hardcode the ID as a constant in an Apex class.
  3. Use the getRecordTypeInfosByName() method in the DescribeSObjectResult class.
  4. Execute a SOQL query on the RecordType object.

Answer(s): C,D



Given:
Map<ID, Account> accountMap = new Map>ID, Account> ([SELECT Id, Name FROM Account]);
What are three valid Apex loop structures for iterating through items in the collection? (Choose three.)

  1. for (ID accountID : accountMap.keySet()) {...}
  2. for (Account accountRecord : accountMap.values()) {...}
  3. for (Integer i=0; I < accountMap.size(); i++) {...}
  4. for (ID accountID : accountMap) {...}
  5. for (Account accountRecord : accountMap.keySet()) {...}

Answer(s): A,B,C



A developer is asked to set a picklist field to `Monitor' on any new Leads owned by a subnet of Users.
How should the developer implement this request?

  1. Create an after insert Lead trigger.
  2. Create a before insert Lead trigger.
  3. Create a Lead Workflow Rule Field Update.
  4. Create a Lead formula field.

Answer(s): C



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