Salesforce Certified Platform Developer I (Set 1)

1 of 63

A developer must create a CreditCardPayment class that provides an implementation of an existing Payment class.

public virtual class Payment {

public virtual void make Payment (Decimal amount) {




Which is the correct implementation?

2 of 63

Where are two locations a developer can look to find information about the status of batch or future methods?

3 of 63

A recursive transaction is initiated by a DML statement creating records for these two objects:


The Account trigger hits a stack depth of 16.

Which statement is true regarding the outcome of the transaction?

4 of 63

Flow Builder uses an Apex Action to provide additional information about multiple Contacts, stored in a custom class, ContactInfo.

Which is the correct definition of the Apex method that gets the additional information?

5 of 63

A third-party vendor created an unmanaged Lightning web component. The Salesforce administrator wishes to expose the component only on Record Page Layouts.

Which two actions should the developer take to accomplish this business objective?

6 of 63

Which exception type cannot be caught?

7 of 63

In terms of the MVC paradigm, what are two advantages of implementing the layer of a Salesforce application using Aura Component-based development over Visualforce?

8 of 63

Universal Containers (UC) uses a custom object called Vendor. The Vendor custom object has a Master-Detail relationship with the standard Account object.

Based on some internal discussions, the UC administrator tried to change the Master-Detail relationship to a Lookup relationship but was not able to do so.

What is a possible reason that this change was not permitted?

9 of 63

A developer needs to prevent the creation of Request records when certain conditions exist in the system. A RequestLogic class exists that checks the conditions.

What is the correct implementation?

10 of 63

What does the Lightning Component framework provide to developers?

11 of 63

When a user edits the Postal Code on an Account, a custom Account text field named ”Timezone” must be updated based on the values in another custom object called PostalcodeToTimezone_c.

What should be built to implement this feature?

12 of 63

What is an example of a polymorphic lookup field in Salesforce?

13 of 63

A credit card company needs to implement the functionality for a service agent to process damaged or stolen credit cards. When the customer calls in, the service agent must gather many pieces of information. A developer is tasked to implement this functionality.

What should the developer use to satisfy this requirement in the most efficient manner?

14 of 63

Which two statements are true about Getter and Setter methods as they relate to Visualforce?

15 of 63

The salesforce administrator created a custom picklist field account_status _c, on the account object. This picklist has possible values of “Inactive” and “Active”. As part of the new business process, management wants to ensure an opportunity record is created only for accounts marked as active. A developer is asked to implement this business requirement.

Which automation tool should be used to fulfill the business need?

16 of 63

What should a developer use to script the deployment and unit test execution as part of continuous integration?

17 of 63

An opportunity needs to have an amount rolled up from a custom object that is not in a master-detail relationship.

How can this be achieved?

18 of 63

A lead developer needs to create an Apex interface called “Laptop”. Consider the following code snippet:

public class Silverlaptop{
//code implementation

How can a developer use the laptop interface within the SilverLaptop class?

19 of 63

How many Accounts will be inserted by the following block of code?

for(Integer i = 0 ; i < 500; i++) {

Account a = new Account(Name=’New Account’ + i);

insert a;


20 of 63

The Job_Application__c custom object has a field that is a Master-Detail relationship to the Contact object, where the Contact object is the Master.

As part of a feature implementation, a developer needs to retrieve a list containing all Contact records where the related Account Industry is ‘Technology’ while also retrieving the contact’s Job_Application__c records.

Based on the object’s relationships, what is the most efficient statement to retrieve the list of contacts?

21 of 63

A PrimaryId__c custom field exists on the Candidate__c custom object. The field is used to store each candidate’s social security number and is marked as Unique in the schema definition.

As part of a data enrichment process, Universal Containers has a CSV file that contains updated data for all candidates in the system. The file contains each Candidate’s social security number as a data point. Universal Containers wants to upload this information into Salesforce while ensuring all data rows are correctly mapped to a candidate in the system.

Which technique should the developer implement to streamline the data upload?

22 of 63

What is the benefit of developing applications in a multi-tenant environment?

23 of 63

What are three capability of the tag when loading Javascript resources in Aura Component?

24 of 63

A developer created a new after insert trigger on the lead object that creates task records for each lead.

After deploying to production, an existing outside integration that inserts Lead records in batches to Salesforce is occasionally reporting total batch failures being caused by the task insert statement. This causes the integration process in the outside system to stop, requiring a manual restart.

Which change should developer make to allow the integration to continue when some records in a batch cause failures due to the Task Insert statement, so that manual restarts are not needed?

25 of 63

A business has a proprietary order management system (OMS) that creates orders from their website and fulfills the order. When the order is created in the OMS, an integration also creates an order record in salesforce and relates it to the contact as identified by the email on the order. As the order goes through different stages in the OMS, the integration also updates it in salesforce.

It is noticed that each update from the OMS creates a new order record in salesforce.

Which two actions will prevent the duplicate order records from being created in Salesforce?

26 of 63

How should a developer write unit tests for a private method in an Apex class?

27 of 63

Which annotations exposes an Apex Class as a Restful web services?

28 of 63

Universal COntainers has a support process that allow users to request support from its engineering team using a custom object, Engineering_Support_c.

Users should be able to associate multiple Engineering_Support_c records to a single opportunity record. Additionally, aggregate information about the Engineering_Support_c records should be shown on the opportunity record.

What should a developer implement to support these requirements?

29 of 63

Given the following Anonymous Block:

List casesToUpdate = new List ();
for (Case this Case: [Select Id, Status FROM Case LIMIT 50000]) {
thisCase. Status=’Working’;
Database.update (casesToUpdate, false);
} catch (Exception e) {
System.debug (e.getMessage () );

What should a developer consider for an environment that has over 10,000 Case records?

30 of 63

A developer is creating an app that contains multiple lightning web components.

One of the child component is used for navigation purposes. When a user click a button called Next in the child component, the parent component must be alerted so it can navigate to the next page.

How should this be accomplished?

31 of 63

What are two characteristics related to formulas?

32 of 63

A developer has an Apex controller for a Visualforce page that takes an ID as a URL parameter.

How should the developer prevent a cross site scripting vulnerability?

33 of 63

A developer wants to mark each Account in a List as either or Inactive based on the LastModified field value being more than 90 days.

Which Apex technique should the developer use?

34 of 63

Universal Hiring is using Salesforce to capture job applications. A salesforce administrator created two custom objects; Job__c acting as the master object, Job_application__c acting as the detail.

Within the Job_c object, a custom multi-select picklist, Preffered_Locations_c, contain a list of approved state for the position. Each Job_application__c record relates to a contact within the system through a master-detail relationship.

The recruiter has requested the ability to view whether the Contact’s Mailing State value matches a value selected on the Preffered_Locations_c field, within the Job_application__c record. Recruiters would like this value to be kept in sync if changes occur to the Contact’s mailing state or if the Job’s Preffered_Locations_c field is updated.

What is the recommended tool a developer should use to meet the business requirement?

35 of 63

A developer migrate functionality from Javascript Remoting to a lightning web component and wants to use the existing getoppotunities() method to provide data.

Which modification to the method is necessary?

36 of 63

What is the value of the Trigger.old context variable in a before insert trigger?

37 of 63

Considering the following code snippet:

public static void insertaccounts(List these Accounts){
for(Account thisAccount : theseAccounts) {
if( == null) { = ‘’;
update theseAccounts;

When the code executes, a DML exception is thrown.

How should the developer modify the code to ensure exceptions are handled gracefully?

38 of 63

What is the result of the following code:

Account a = new Account(Name = ‘A’);
Database.insert(a, false);

39 of 63

An Approval Process is defined in the Expense_Item__c object. A business rule dictates that whenever a user changes the Status to ‘Submitted’ on an Expense_Report__c record, all the Expense_Item__c records related to the expense report must enter the approval process individually.

A Developer is asked to explore if this automation can be implemented without writing any Apex Code.

WHich statement is true regarding this automation request?

40 of 63

The order helper class is a utility class that contains business logic for processing orders. Considers the following snippet:

public class without sharing OrderHelper[
//code implementation

A developer need to create a constant named DELIVERY_MULTIPLIER with a value of 4.15. The value of the constant should not change at any time in the code.

How should the developer declare the DELIVERY_MULTIPLIER constant to meet the business objectives?

41 of 63

An org has an existing Flow that creates an Opportunity with an Update Records element. A developer wants also create a contact and store the created Contact’s Id on the Opportunity.

Which update should the developer make in the visual Flow?

42 of 63

Which three data types can a SOQL query return?

43 of 63

Which statement is true regarding execution order when triggers are associated to the same object and event?

44 of 63

Managers at Universal Containers want to ensure that only decommissioned containers are able to deleted in the system. TO meet the business requirement a salesforce developer adds “Decommissioned” as a picklist value for the Status_c custom field within the Container_c object.

Which tool should the developer use to enforce only Container records with a status of “Decommissioned” can be deleted?

45 of 63

Universal Containers has created a unique process for tracking container repairs. A custom field, Status_c, has been created within the Container_c custom object. A developer is tasked with sending notifications to multiple external systems every time the value of the Status_c picklist changes.

Which two tools should the developer use to meet the business requirement and ensure low maintenance of the solution?

46 of 63

Which three code lines are required to create a Lightning component on a Visualforce page?

47 of 63

When using SalesforceDX, what does a developer need to enable to create and manage scratch orgs?

48 of 63

Universal Containers wants a list button to display a Visualforce page that allows users to edit multiple records.

Which Visualforce feature supports this requirement?

49 of 63

A developer creates a custom exception as shown below:

public class ParityException extends Exceptions {}

What are two ways the developer can fire the exception in Apex?

50 of 63

When importing and exporting data into Salesforce, which two statements are true?

51 of 63

A developer has a single custom controller class that works with a Visualforce Wizard to support creating and editing multiple subjects. The wizard accepts data from user inputs across multiple Visualforce pages and from a parameter on the initial URL.

Which three statements are useful inside the unit test to effectively test the custom controller?

52 of 63

While working in a sandbox, an Apex test fails when run in the Test framework. However, running the Apex test logic in the execute anonymous window succeed with no exceptions or errors.

Why did the method fail in the Sandbox test framework but succeed in the Developer Console?

53 of 63

What are two ways for a developer to execute tests in an org?

54 of 63

A team of many developers work in their own individual orgs that have the same configuration at the production org.

Which type of org is best suited for this scenario?

55 of 63

Which two process automations can be used on their own to send Salesforce Outbound message?

56 of 63

A developer created a weather app that contains multiple Lightning web components.

One of the components, called Toggle, has a toggle for Fahrenheit or Celsius units. Another component, called Temperature, displays the current temperature in the unit selected in the Toggle component

When a user toggles from Fahrenheit to Celsius or vice versa in the Toggle component, the information must be sent to the Temperature component so the temperature can be converted and displayed.

What is the recommend way to accomplish this?

57 of 63

When a user toggles from Fahrenheit to celsius or vice versa in the Toggle component, the information must be sent to the Temperature component so the temperature can be converted and displayed.

What is the recommended way to accomplish this?

58 of 63

A development team wants to use a deployment script to automatically deploy to a sandbox during their development cycles.

Which should they use to deploy to the sandbox?

59 of 63

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?

60 of 63

A large corporation stores orders and line items in salesforce for different lines of business. Users are allowed to see Orders across the entire organization, but, for security purposes, should only be able to see the Line Items for Orders in their line of business.

Which type of relationship should be used between Line Items and Orders?

61 of 63

In the following example, which sharing context will myMethod execute when it is invoked?

public Class Myclass (
public void Mymethod() {

/* implementation */


62 of 63

Universal Containers implemented a private sharing model for the Account object. A custom Account search tool was developed with Apex to help sales representatives find accounts that match multiple criteria they specify. Since its release, users of the tool report they can see Accounts they do not own.

What should the developer use to enforce sharing permissions for the currently logged-in user while using the custom search tool?

63 of 63

A developer writes a trigger on the Account object on the before update event that increments a count field. A workflow rule also increments the count field every time that an Account is created or updated. The field update in the workflow rule is configured to not re-evaluate workflow rules.

What is the value of the count field if an Account is inserted with an initial value of zero, assuming no other automation logic is implemented on the Account?