Courseiva

SALESFORCE-PD1 · domain

Developer Fundamentals

Practise Salesforce Certified Platform Developer I (SALESFORCE-PD1) Developer Fundamentals practice questions — original exam-style scenarios with answer choices, explanations, and analysis of common mistakes.

115 questions34 easy41 medium40 hard

Focused practice

Practice Developer Fundamentals questions

Scored sessions drawing only from this domain — pick a length below.

Start 20-question practice test →

What this domain covers

What to know about Developer Fundamentals

Developer Fundamentals questions test whether you can apply the concept in context, not just recognise a definition.

How the topic appears in realistic exam-style scenarios.

Which detail in the question changes the correct answer.

How to eliminate plausible but wrong options.

How to connect the question back to the wider exam objective.

Watch out for

Common Developer Fundamentals exam traps

  • Answering from memory before reading the full scenario.
  • Missing a constraint such as cost, availability, security, scope or command context.
  • Choosing a broad answer when the question asks for the most specific fix.
  • Ignoring why the wrong options are tempting.

Question index

All Developer Fundamentals questions (115)

Click any question to see the full explanation, or start a practice session above.

1

A developer wants to retrieve the developer name of the current user's profile in Apex. Which object relationship should be queried via SOQL?

Easy
2

What is the primary purpose of the Model-View-Controller (MVC) design pattern implementation in Lightning Web Components (LWC)?

Easy
3

Which THREE techniques help prevent hitting governor limits when writing SOQL queries in Apex? Choose 3 answers.

Hard
4

A developer needs to retrieve Account records along with their associated Contacts in a single query. Which query syntax is correct?

Medium
5

A developer needs to write an Apex trigger that fires before an Account is inserted and accesses the value of the custom field 'Rating__c'. Which collection type is best suited to iterate over the incoming records in the trigger context variable?

Easy
6

A developer needs to convert a JSON string representing a list of Account records into an actual List<Account> in Apex. Which method should be used?

Medium
7

A developer is writing a trigger on the Contact object that needs to reference old field values during an update operation. In which trigger context variable are these previous values stored?

Hard
8

Which TWO statements about SOQL relationship queries are true? Choose 2 options.

Medium
9

Which TWO tools or features are part of the Model-View-Controller (MVC) architecture implementation in Salesforce declarative and programmatic development? Choose 2 answers.

Medium
10

A developer implements a custom Apex controller for a Visualforce page that performs DML operations. Which THREE best practices should be followed to ensure robust data management and security? (Choose three.)

Hard
11

A developer needs to update 5,000 Account records and wants to ensure that if any single record fails validation, none of the records are committed to the database. Which method should be used?

Medium
12

An application uses a SOSL search to find records across multiple objects. Which return type must be used to capture the results in Apex?

Hard
13

A developer is building a custom Lightning Web Component and wants to communicate data from a child component up to its parent component. Which THREE steps are required? (Choose three.)

Medium
14

Which THREE actions can a developer take to optimize SOSL query performance and adhere to best practices? Choose 3 answers.

Hard
15

An Apex trigger needs to prevent records from being saved if a specific validation condition fails. How should the developer reject the DML operation on a specific record?

Hard
16

Which TWO methods are used to inspect sObject field metadata dynamically in Apex? Choose 2 options.

Easy
17

What is the return type of a SOQL query that returns a single aggregate result, such as SELECT COUNT() FROM Account?

Easy
18

A developer is writing a batch Apex class. During the execute method, a record fails validation. The developer wants to ensure that successfully processed records in the same batch are committed while failing records are logged without aborting the entire batch. How should the DML be performed?

Hard
19

A developer needs to find all records across multiple objects (Contact, Lead, and Account) that contain the exact phrase 'Acme Corp'. Which feature should be used?

Medium
20

Which THREE best practices should a developer follow when implementing CRUD and FLS checks in Apex? Choose 3 answers.

Hard
21

A developer is writing code that processes untrusted data and wants to automatically strip fields and relationships that the current user cannot access, without throwing an exception. Which feature should be used?

Hard
22

Which Apex data type should a developer use to represent a precise geographic location with latitude and longitude coordinates?

Easy
23

Which collection type stores elements as key-value pairs in Apex?

Easy
24

An Apex trigger executes during a bulk insert of 300 records. To adhere to best practices regarding governor limits and bulkification, how should SOQL queries be written?

Hard
25

A developer wants to ensure that a custom Apex REST service method properly handles authentication and executes securely in the context of the calling user. How should the class be defined?

Hard
26

A developer is writing a SOQL query to find accounts where the billing country starts with 'United'. Which operator should be used?

Medium
27

A developer is writing an Apex trigger that needs to execute logic only when records are updated and a specific custom field 'Status__c' changes from 'Draft' to 'Submitted'. Which THREE elements are required to implement this check correctly? (Choose three.)

Hard
28

Which SOQL aggregate function should a developer use to count the exact number of rows returned by a query without retrieving the records into memory?

Easy
29

Which TWO methods are available on the Database class for performing DML operations with partial success capability? Choose 2 options.

Easy
30

A developer needs to retrieve 10 Account records starting from the 21st record to implement pagination in a custom component. Which SOQL clause should be used?

Medium
31

A developer needs to dynamically instantiate an sObject type based on a string variable representing the object name (e.g., 'Account'). Which method should be used?

Medium
32

A developer needs to ensure that an Apex class respects organization-wide defaults, role hierarchies, and sharing rules when querying custom objects. Which keyword should be added to the class definition?

Medium
33

Which TWO features are characteristics of SOSL (Salesforce Object Search Language) queries? Choose 2 answers.

Medium
34

A developer needs to retrieve a list of Accounts along with their related Contacts using a single SOQL query in Apex. Which query structure is syntactically correct?

Medium
35

What is the correct way to declare a constant variable in Apex?

Easy
36

Which THREE operations will cause an immediate transaction rollback or DML failure when utilizing standard DML statements in Apex? Choose 3 answers.

Hard
37

Which Apex data type is best suited for storing monetary amounts with high precision?

Easy
38

What is the correct file extension for an Apex class created in Salesforce DX?

Easy
39

A developer wants to retrieve up to 5 recently viewed records of any object type using SOSL. Which SOSL clause specifies the maximum number of records to return?

Easy
40

A developer writes a SOQL query to aggregate total opportunity amounts grouped by stage name. Which SOQL clause is required?

Medium
41

Which TWO data types can be used as keys in an Apex Map? Choose 2 answers.

Medium
42

A developer is writing an Apex trigger and needs to optimize performance and prevent governor limit violations. Which TWO practices should the developer follow? (Choose two.)

Medium
43

A developer needs to ensure that a custom Apex controller safely checks whether the current user has read access to the 'Salary__c' field on the 'Employee__c' object before displaying it in a Lightning Web Component. Which method should the developer use?

Medium
44

What is the maximum number of SOQL queries that can be issued in a single synchronous Apex transaction?

Easy
45

A developer wants to define a constant value in an Apex class that can be accessed globally without instantiating the class. Which combination of keywords should be used?

Easy
46

Which TWO statements are true regarding the behavior of Apex triggers and context variables? Choose 2 answers.

Medium
47

Which THREE collections are available in Apex? (Choose three.)

Easy
48

Which collection method is used to add all elements from one Set into another Set in Apex?

Easy
49

An Apex trigger needs to prevent duplicate records from being inserted based on a custom external ID field. Which approach should the developer take to optimize query performance and respect governor limits?

Hard
50

Which THREE factors can cause an Apex CPU time limit exception in a synchronous transaction? Choose 3 answers.

Hard
51

A developer needs to assign a default value to a custom picklist field via Apex when creating a Lead record. What data type should be assigned to the picklist field in Apex?

Medium
52

Which THREE tools or contexts can be used to execute Anonymous Apex code? Choose 3 options.

Hard
53

Which TWO statements about Apex variables and initialization are true? Choose 2 options.

Easy
54

A developer needs to store a collection of Account IDs where duplicates are automatically prevented and lookups are extremely fast. Which collection type should the developer use?

Easy
55

Which THREE operations can cause an automatic roll back of an entire Apex transaction? Choose 3 options.

Hard
56

A developer needs to convert a JSON string representing a list of Account objects into an actual Apex List of Accounts. Which method should be used?

Medium
57

A developer has written an Apex method that executes a SOQL query to retrieve all Contacts associated with an Account. The method needs to be invoked securely without bypassing the user's organization-wide defaults and sharing settings. How should the developer execute this query?

Medium
58

A developer needs to check if a specific key exists in a Map<String, Decimal> before retrieving its value. Which Map method should be used?

Easy
59

An enterprise application requires Apex code to check whether the current user has read access to a specific custom field before displaying it in a custom Lightning Web Component. What is the most appropriate class to use?

Hard
60

Which tool or feature in Salesforce Developer Console allows a developer to inspect debug logs and filter them by category and level?

Easy
61

Which THREE best practices should a developer follow to avoid governor limits when writing SOQL queries in Apex? Choose 3 options.

Hard
62

Which Salesforce data model relationship type allows two objects to have a many-to-many relationship through a junction object?

Easy
63

What is the maximum number of SOQL queries that can be issued in a single synchronous Apex transaction?

Easy
64

A developer creates a custom Lightning Web Component that includes a wired property to retrieve account records. The component needs to react dynamically when the record data is updated via another component on the page. Which decorator should be used on the JavaScript property to receive reactive updates?

Hard
65

An Apex trigger invokes a helper method that performs a DML operation, but the developer wants to establish a rollback point so that prior changes can be reverted if a subsequent error occurs. Which feature should be used?

Hard
66

A developer needs to determine if the current user has delete permissions on the Opportunity object in Apex before calling a deletion method. Which method should be used?

Hard
67

A developer needs to convert a String variable containing a numeric value into an Integer in Apex. Which method should be used?

Medium
68

Which method is used to get the number of elements in an Apex List?

Easy
69

Which TWO primitive data types are natively supported in Apex? Choose 2 options.

Easy
70

Which TWO statements about SOSL (Salesforce Object Search Language) are true? Choose 2 options.

Medium
71

Which TWO statements are true regarding the Salesforce security model and Apex execution context? Choose 2 answers.

Medium
72

Which TWO collection interfaces or classes are provided in Apex? Choose 2 options.

Easy
73

Which collection type in Apex stores elements as key-value pairs where each key maps to a single value?

Easy
74

An Apex trigger processes a list of Case records. The developer wants to group the cases by their AccountId. Which data structure is best suited for this grouping?

Hard
75

A developer needs to query Task records related to Account records using a parent-to-child relationship. What is the standard child relationship name for Tasks on the Account object?

Medium
76

Which THREE features are enforced when an Apex class is defined with the 'with sharing' keyword? Choose 3 options.

Hard
77

Which component of the MVC design pattern in Salesforce Lightning Web Components (LWC) represents the data model and business logic layer?

Easy
78

A developer writes an Apex method that executes a SOQL query inside a for-loop over a list of 200 Account records. Which governor limit is most likely to be immediately breached?

Hard
79

Which TWO collections are valid in Apex and maintain the insertion order of their elements? Choose 2 answers.

Medium
80

A developer needs to convert a string variable containing an alphanumeric Salesforce ID into an ID primitive data type. Which approach is valid in Apex?

Medium
81

An application has complex business logic where an Apex class called from a trigger needs to know whether it was invoked from an insert or update trigger context. How can the developer determine this?

Hard
82

A developer writes an Apex method with the 'inherited sharing' keyword. What is the behavior of this class when invoked from a class declared with 'with sharing'?

Hard
83

A developer writes a SOQL query to fetch Account records and wants to bind a list of strings called 'targetNames' as filter criteria. Which syntax is correct?

Medium
84

Which TWO types of triggers can be defined in Apex? Choose 2 options.

Medium
85

Which SOQL query utilizes the correct syntax to retrieve child Contact records from a parent Account record using the standard relationship name?

Easy
86

Which THREE statements are accurate regarding Apex transaction control and database savepoints? Choose 3 answers.

Hard
87

A developer writes a SOQL query using the FORMAT() keyword. What is the purpose of this keyword?

Medium
88

A developer needs to write a secure SOQL query that prevents unauthorized data exposure by respecting both sharing rules and field-level security. Which TWO approaches can the developer combine to achieve this? (Choose two.)

Hard
89

An application has a requirement to query records owned by subordinate users in the role hierarchy using Apex. Which SOQL feature supports this capability?

Hard
90

An Apex trigger executes a query inside a for-loop to fetch related child records for every parent Account in Trigger.new. The developer notices that when a data load of 200 accounts occurs, the governor limit for total SOQL queries issued is exceeded. How should the developer refactor the code?

Hard
91

Which THREE data types are primitive data types supported in Apex? (Choose three.)

Easy
92

A developer is writing a test class for an Apex trigger and needs to insert test Account records. Best practices recommend bypassing hardcoded IDs. Which annotation should be placed on the test setup method to create common test data efficiently?

Medium
93

A developer wants to ensure that a custom Apex controller method can be invoked securely from a Lightning Web Component. Which annotation must be applied to the method?

Medium
94

A developer needs to implement a custom logging framework. Which Apex data type should be used to represent a variable that can store any primitive value, sObject, or collection dynamically?

Hard
95

A developer needs to store a collection of unique customer email addresses in Apex and check for existence efficiently. Which collection type should the developer use?

Easy
96

A developer is implementing a custom logging framework in Apex. Due to high transaction volumes, multiple asynchronous log entries need to be queued without hitting the maximum number of queueable jobs allowed in a single transaction. What is the execution limit for chained Queueable jobs?

Hard
97

Which TWO trigger context variables are available in BEFORE INSERT triggers? Choose 2 options.

Medium
98

A developer needs to run an Apex class in system mode, ignoring user-level object and field-level permissions, but enforcing organization-wide sharing rules. How should the class be declared?

Medium
99

An Apex trigger needs to check whether the current user has read access to the 'AnnualRevenue' field on the Account object before performing a calculation. Which method should the developer use?

Medium
100

An enterprise application requires dynamic execution of a SOQL query where the object type and fields to query are determined at runtime based on user input. Which feature should the developer use to prevent SOQL injection vulnerabilities?

Hard
101

Which THREE design patterns or tools help ensure secure coding practices regarding CRUD and FLS in Apex? Choose 3 options.

Hard
102

Which type of Apex trigger context variable returns a list of new versions of the sObject records?

Easy
103

An Apex trigger needs to execute logic only when a specific custom field (Discount_Percent__c) on an Opportunity changes its value. Which comparison should the developer use?

Hard
104

An Apex trigger processes a large volume of Opportunity updates. The developer uses Database.update(opps, false) to allow partial success. How should the developer inspect the results to handle any failures?

Hard
105

An Apex trigger needs to query related Account records for a list of newly inserted Contact records. What is the most robust way to handle the relationship query in SOQL to avoid governor limits?

Medium
106

A developer writes an Apex method that executes a SOQL query using user-supplied search parameters. How can the developer protect against SOQL injection vulnerabilities?

Hard
107

A developer needs to execute a dynamic SOQL query where the object name and fields are determined at runtime. Which method should be used?

Medium
108

An Apex transaction performs a DML operation, followed by a callout to an external REST API, followed by another DML operation. What exception will Salesforce throw?

Hard
109

Which primitive data type in Apex can represent a specific point in time, including both date and time values?

Easy
110

A developer needs to iterate over a map of Account IDs to Account sObjects and perform processing on each value. Which loop construct is valid Apex?

Hard
111

A developer is writing an Apex method and needs to store a collection of unique email addresses while maintaining fast lookup times. Which collection should the developer choose?

Easy
112

A developer needs to query all Contact records, including those that have been deleted from the database via the Recycle Bin. Which SOQL clause must be added?

Medium
113

A developer needs to query all Contact records, including those that have been moved to the Recycle Bin. Which SOQL keyword should be used?

Medium
114

Which TWO options represent valid ways to instantiate and populate a Set of Strings in Apex? Choose 2 options.

Medium
115

A developer needs to query records using SOSL in Apex. Which THREE components are syntactically required in a valid SOSL statement? (Choose three.)

Medium

Frequently asked questions

What does the Developer Fundamentals domain cover on the SALESFORCE-PD1 exam?
Developer Fundamentals questions test whether you can apply the concept in context, not just recognise a definition.
How many questions are in this domain?
This page lists all 115 Developer Fundamentals questions in the SALESFORCE-PD1 question bank. The actual exam draws from this domain proportionally to its weighting in the official exam blueprint.
What is the best way to practise this domain?
Start with a short focused session (10 questions) to identify gaps, then work through explanations. Repeat with a longer session once the weak areas feel solid.
Can I practise only Developer Fundamentals questions?
Yes — the session launcher on this page filters questions to this domain only. Choose any session length for inline explanations and scoring.
Salesforce Certified Platform Developer I (SALESFORCE-PD1) Developer Fundamentals Practice Questions