Free Salesforce Platform Developer 1 Practice Exam (with Answers)

Try our 60-question practice exam to see if you are ready to take on the real exam.

  • Professionally written questions by Salesforce Developer, Alex Crisp.
  • Explanations and links to additional learning resources are included to ensure you are set for success.
  • 100% free practice questions.

/60

Platform Developer 1

There is a 105-minute time limit. 68% is the official passing score.

Good luck!

1 / 60

As a developer, you wish to utilise scratch orgs to streamline the development process within your team. What are the requirements to do this?

2 / 60

Which of the following statements are true about formula fields? (Choose 2)

3 / 60

Which of the following code snippets correctly defines a new custom exception?

4 / 60

What benefits are there to using the Lightning Web Component Framework? (Choose 4)

5 / 60

A developer wishes to write a single Apex method which can process both Opportunity and Lead records, what would be the correct method signature?

6 / 60

You have a Visualforce page displaying an Opportunity record. You wish to display details about the Account record linked to this Opportunity. This page utilises the standard controller. How could you add the Account name to the page?

7 / 60

An integration is to be built which inserts Leads into your company's Salesforce instance in bulk from its website daily. Some of the records are spam and do not contain valid field data. Which of the following statements would facilitate this?

8 / 60

What are the valid target source pairs for a changeset deployment? (Choose 2)

9 / 60

Which of the following statements is true about Flows? (Choose 2)

10 / 60

What are the use cases for the Test.startTest() and Test.stopTest() methods when used within a test class? (Choose 2)

11 / 60

A Lead has been converted to a Contact and Account, which triggers are fired?

12 / 60

A custom field was added to Opportunity which has become redundant due to new business processes. What must be done before deleting the field?

13 / 60

Which of the following is true about roll-up summary fields?

14 / 60

As a developer you have been tasked with creating a simple record form to create Cases on a private community page, how could you best achieve this?

15 / 60

You are building an application which tracks student enrollments on a course. A student can be enrolled on many different courses at once and a course has many students enrolled on it. What data model should be used to track a student’s enrollments on a course and ensure data integrity?

16 / 60

How can a developer execute an anonymous block of Apex code? (Choose 3)

17 / 60

How can a developer react to and handle errors gracefully?

18 / 60

You have been requested to generate a simple PDF displaying line items for an Opportunity. How can you best achieve this?

19 / 60

What is the maximum number of records that can be processed by a trigger at a time?

20 / 60

How can Apex classes be deleted from production instances?

21 / 60

A developer creates an Apex trigger which calls a method within another class. A test has been written which directly calls the method within the class and provides 100% code coverage. There are no other Apex classes present within the org. What would be the result of deploying a changeset with this trigger and classes into production with running all tests?

22 / 60

There is a trigger on the Contact object which causes an update on the parent Account object. The Account update uses an update DML statement and triggers a validation rule. Which of the following statements is true?

23 / 60

In which Salesforce environments can Lightning Components be used? (Choose 3)

24 / 60

How can we best reference external resources (e.g. CSS or JavaScript) within Lightning Components and Visualforce pages?

25 / 60

There are two before save triggers defined for the Contact object, which one of them runs first?

26 / 60

Which of the following uses the correct naming convention to be used for naming CustomEvent fired from Lightning Web Components using dispatch event?

27 / 60

What considerations must a developer make when working in a multi-tenant environment?

28 / 60

What tools can be used to develop Lightning Web Components?

29 / 60

Which of the following code blocks is correct for executing a SOSL query within Apex?

30 / 60

How can a developer schedule an Apex job? (Choose 2)

31 / 60

You are working for a large paint distributor and have been requested that whenever an Opportunity is created with a value over £10000 to automatically set the owner to the Sales Team Leader. What automation tool is best suited to this task?

32 / 60

A developer wishes to streamline the setting up of data for their test class. How could this be achieved? (Choose 2)

33 / 60

Which of the following statements is true about sharing keywords of Apex classes?

34 / 60

How can data for a record be easily accessed in Lightning Components?

35 / 60

A developer wishes to write a test for a private method within a class, how can this be best achieved?

36 / 60

You have been tasked with creating a process which sends a very large number of emails to Contacts within an Org, how best could this be achieved?

37 / 60

You have an @AuraEnabled method which accepts an SObject from a Lightning Component which will be inserted, how can you easily sanitise the user’s input?

38 / 60

As a developer you wish to build a reusable Lightning Web Component which can be used to search records and to select one. Which snippet can this component alert its parent component to the selected record?

39 / 60

A developer has an @AuraEnabled method that is frequently used in several Lightning Web Components. It performs some complex calculations based on data stored within custom metadata. Unless these values change, this method will always return the same result. How can the developer improve the runtime performance of Lightning Components utilising this method?

40 / 60

A developer wishes to add a picklist to a Lightning Web Component they are building. Which of the following snippets should they use?

41 / 60

Which of the following isn’t true about Visualforce standard controllers?

42 / 60

A developer wishes to iterate over a list of records returned from a query, which of the following loop types is most appropriate?

43 / 60

What data types can a SOQL query return? (Choose 3)

44 / 60

You have been tasked with importing data from a legacy CRM system into a new Salesforce org. The legacy CRM system had database tables analogous to the Account, Contact and Opportunity objects within Salesforce. How could you best ensure the relationships are preserved during this data migration?

45 / 60

What is the primary purpose of creating test classes in Apex?

46 / 60

How can a developer declaratively access a specific custom metadata type (MyCustomMetadataType__mdt) record within Apex?

47 / 60

Which of the following method signatures allows an Apex method to be used by the wire service?

48 / 60

A developer has many records which must be displayed on a Visualforce page, how can they best add pagination?

49 / 60

You are working for a server installation provider and have been requested that whenever an Opportunity is created with a value over £10000 to enforce that there has been a Site Review record created before allowing the Opportunity stage to be set to Closed Won. How best can this be achieved?

50 / 60

What would be the result of executing the following Apex test?

51 / 60

What would the value of the instance variable “foo” be after the third execution of the following batch class?

52 / 60

A custom field on Opportunity is assigned the number data type, with 18 digits and 0 decimal places. Which primitive data type would this be assigned in Apex?

53 / 60

You are tasked with creating a Lightning Component which will allow a user to search public records of an object by filtering multiple field values. What can be done to ensure this component can be securely used?

54 / 60

You have been tasked with writing a utility class which can be called from multiple contexts, for example while running as an Experience User and an internal user who should see all records. Which sharing declaration should be used in your class to facilitate this?

55 / 60

What is the value of “foo” after this following code has been executed?

56 / 60

Can Lightning Components subscribe to Platform Events?

57 / 60

Which action can be performed in a before insert trigger?

58 / 60

Which of the following statements should be added to the following for loop to exit the loop – on line 10 - when a matching record is first found?

59 / 60

What is the result if the following trigger is executed for 50 records?

60 / 60

Which of the following snippets can be used to obtain the Stage picklist values on the Opportunity object?

Your score is

0%

“I really enjoy studying on the Salesforce Ben platform. It is easy to navigate, has great content and explanation. I would definitely recommend you to enroll in the course when studying for the administrator certification. You will find the right tool to succeed.”

Chloé Ducharme