Practice SALESFORCE-PD1 Developer Fundamentals questions with full explanations on every answer.
Start practicing
Developer Fundamentals — choose a session length
Free · No account required
Click any question to see the full explanation and answer options, or start a focused practice session above.
What is the maximum number of SOQL queries that can be issued in a single synchronous Apex transaction?
2A developer needs to retrieve Account records along with their associated Contacts in a single query. Which query syntax is correct?
3A 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?
4An 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?
5A developer writes an Apex method that executes a SOQL query using user-supplied search parameters. How can the developer protect against SOQL injection vulnerabilities?
6Which Apex data type should a developer use to represent a precise geographic location with latitude and longitude coordinates?
7An 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?
8A 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?
9Which component of the MVC design pattern in Salesforce Lightning Web Components (LWC) represents the data model and business logic layer?
10A 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?
11A 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?
12Which type of Apex trigger context variable returns a list of new versions of the sObject records?
13An 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?
14A 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'?
15A 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?
16Which collection method is used to add all elements from one Set into another Set in Apex?
17What is the correct way to declare a constant variable in Apex?
18Which method is used to get the number of elements in an Apex List?
19An 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?
20A developer needs to query all Contact records, including those that have been moved to the Recycle Bin. Which SOQL keyword should be used?
21A developer is writing a SOQL query to find accounts where the billing country starts with 'United'. Which operator should be used?
22A 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?
23An 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?
24A developer needs to execute a dynamic SOQL query where the object name and fields are determined at runtime. Which method should be used?
25A developer writes a SOQL query to aggregate total opportunity amounts grouped by stage name. Which SOQL clause is required?
26Which tool or feature in Salesforce Developer Console allows a developer to inspect debug logs and filter them by category and level?
27What is the correct file extension for an Apex class created in Salesforce DX?
28Which SOQL aggregate function should a developer use to count the exact number of rows returned by a query without retrieving the records into memory?
29A 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?
30A 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?
31An 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?
32A developer needs to convert a String variable containing a numeric value into an Integer in Apex. Which method should be used?
33Which collection type in Apex stores elements as key-value pairs where each key maps to a single value?
34Which TWO types of triggers can be defined in Apex? Choose 2 options.
35A 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?
36A 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?
37An 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?
38Which TWO primitive data types are natively supported in Apex? Choose 2 options.
39Which TWO statements about SOSL (Salesforce Object Search Language) are true? Choose 2 options.
40Which TWO methods are available on the Database class for performing DML operations with partial success capability? Choose 2 options.
41Which THREE tools or contexts can be used to execute Anonymous Apex code? Choose 3 options.
42Which TWO collection interfaces or classes are provided in Apex? Choose 2 options.
43Which TWO trigger context variables are available in BEFORE INSERT triggers? Choose 2 options.
44Which THREE features are enforced when an Apex class is defined with the 'with sharing' keyword? Choose 3 options.
45Which THREE best practices should a developer follow to avoid governor limits when writing SOQL queries in Apex? Choose 3 options.
46Which TWO statements about Apex variables and initialization are true? Choose 2 options.
47Which TWO options represent valid ways to instantiate and populate a Set of Strings in Apex? Choose 2 options.
48Which TWO statements about SOQL relationship queries are true? Choose 2 options.
49Which THREE operations can cause an automatic roll back of an entire Apex transaction? Choose 3 options.
50Which TWO methods are used to inspect sObject field metadata dynamically in Apex? Choose 2 options.
51Which THREE design patterns or tools help ensure secure coding practices regarding CRUD and FLS in Apex? Choose 3 options.
52A 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?
53An 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?
54A 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?
55Which SOQL query utilizes the correct syntax to retrieve child Contact records from a parent Account record using the standard relationship name?
56An application uses a SOSL search to find records across multiple objects. Which return type must be used to capture the results in Apex?
57A 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?
58What is the primary purpose of the Model-View-Controller (MVC) design pattern implementation in Lightning Web Components (LWC)?
59A 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?
60Which primitive data type in Apex can represent a specific point in time, including both date and time values?
61A 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?
62What is the maximum number of SOQL queries that can be issued in a single synchronous Apex transaction?
63A 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?
64An 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?
65A 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?
66A 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?
67Which Salesforce data model relationship type allows two objects to have a many-to-many relationship through a junction object?
68Which collection type stores elements as key-value pairs in Apex?
69A 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?
70A 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?
71A 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?
72An 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?
73Which Apex data type is best suited for storing monetary amounts with high precision?
74A developer needs to convert a string variable containing an alphanumeric Salesforce ID into an ID primitive data type. Which approach is valid in Apex?
75What is the return type of a SOQL query that returns a single aggregate result, such as SELECT COUNT() FROM Account?
76An 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?
77A developer writes a SOQL query using the FORMAT() keyword. What is the purpose of this keyword?
78An application has a requirement to query records owned by subordinate users in the role hierarchy using Apex. Which SOQL feature supports this capability?
79Which TWO statements are true regarding the behavior of Apex triggers and context variables? Choose 2 answers.
80Which TWO collections are valid in Apex and maintain the insertion order of their elements? Choose 2 answers.
81Which THREE actions can a developer take to optimize SOSL query performance and adhere to best practices? Choose 3 answers.
82Which THREE operations will cause an immediate transaction rollback or DML failure when utilizing standard DML statements in Apex? Choose 3 answers.
83Which TWO tools or features are part of the Model-View-Controller (MVC) architecture implementation in Salesforce declarative and programmatic development? Choose 2 answers.
84Which TWO data types can be used as keys in an Apex Map? Choose 2 answers.
85Which THREE statements are accurate regarding Apex transaction control and database savepoints? Choose 3 answers.
86Which THREE best practices should a developer follow when implementing CRUD and FLS checks in Apex? Choose 3 answers.
87Which TWO features are characteristics of SOSL (Salesforce Object Search Language) queries? Choose 2 answers.
88Which TWO statements are true regarding the Salesforce security model and Apex execution context? Choose 2 answers.
89Which THREE techniques help prevent hitting governor limits when writing SOQL queries in Apex? Choose 3 answers.
90Which THREE factors can cause an Apex CPU time limit exception in a synchronous transaction? Choose 3 answers.
91A 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?
92A 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?
93An 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?
94A 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?
95A 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?
96An 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?
97A 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?
98A 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?
99A 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?
100A 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?
101A 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?
102A 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?
103A developer needs to check if a specific key exists in a Map<String, Decimal> before retrieving its value. Which Map method should be used?
104A 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?
105An 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?
106A developer wants to retrieve the developer name of the current user's profile in Apex. Which object relationship should be queried via SOQL?
107A 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?
108Which THREE data types are primitive data types supported in Apex? (Choose three.)
109A 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.)
110A 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.)
111Which THREE collections are available in Apex? (Choose three.)
112A 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.)
113A 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.)
114A 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.)
115A developer needs to query records using SOSL in Apex. Which THREE components are syntactically required in a valid SOSL statement? (Choose three.)
The Developer Fundamentals domain covers the key concepts tested in this area of the SALESFORCE-PD1 exam blueprint published by Salesforce. Courseiva provides free domain-focused practice, mock exams, missed-question review, and readiness tracking across all SALESFORCE-PD1 domains — no account required.
The Courseiva SALESFORCE-PD1 question bank contains 115 questions in the Developer Fundamentals domain. Click any question to see the full explanation and answer breakdown.
Start with a 10-question focused session to identify your baseline accuracy in this domain. Read every explanation — even for questions you answer correctly — to understand the reasoning. Once you score consistently above 80%, move to a 20–30 question session to confirm depth before moving to the next domain.
Yes — the session launcher on this page draws questions exclusively from the Developer Fundamentals domain. Choose 10, 20, 30, or 50 questions for a focused session, or click individual questions to review them one by one.
Save your results, see per-domain analytics, and get readiness scores — free, for every certification.
Sign Up FreeFree forever · Every certification included