Be able to read Apex snippets and state whether they compile and which governor limit they hit. The single most important habit: keep SOQL and DML outside loops and use Database methods when partial success is required.
Start practicing
Developer Fundamentals — choose a session length
Free · No account required
Domain overview
Developer Fundamentals covers Apex language basics, sObject and DML operations, SOQL/SOSL queries, and the Salesforce governor limits that govern them. Questions present short code scenarios and ask you to pick valid syntax, identify the limit or exception a snippet triggers, or choose the correct API method for a task.
Exam objectives
Apex primitive and collection types, including Date, Datetime, and Map iteration constructs
DML statements versus Database class methods and their all-or-nothing versus partial-success behavior
SOQL and SOSL syntax, relationship queries, and querying inside loops
Governor limits such as SOQL queries, DML statements, and CPU time per transaction
Assuming Database.insert is all-or-nothing; it returns SaveResult objects and allows partial success unless allOrNone is set true.
Placing SOQL or DML inside a for-loop, which breaches the 100-query or 150-statement limit quickly.
Confusing Date with Datetime, or using a Map loop syntax that does not match the map's key or value types.
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 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?
3An 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?
4A developer writes an Apex method that executes a SOQL query using user-supplied search parameters. How can the developer protect against SOQL injection vulnerabilities?
5Which Apex data type should a developer use to represent a precise geographic location with latitude and longitude coordinates?
6A 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?
7Which component of the MVC design pattern in Salesforce Lightning Web Components (LWC) represents the data model and business logic layer?
8A 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?
9A 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?
10Which type of Apex trigger context variable returns a list of new versions of the sObject records?
11An 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?
12A 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'?
13A 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?
14Which method is used to get the number of elements in an Apex List?
15An 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?
16A developer needs to query all Contact records, including those that have been moved to the Recycle Bin. Which SOQL keyword should be used?
17A developer is writing a SOQL query to find accounts where the billing country starts with 'United'. Which operator should be used?
18A 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?
19An 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?
20A developer needs to execute a dynamic SOQL query where the object name and fields are determined at runtime. Which method should be used?
21A developer writes a SOQL query to aggregate total opportunity amounts grouped by stage name. Which SOQL clause is required?
22Which tool or feature in Salesforce Developer Console allows a developer to inspect debug logs and filter them by category and level?
23What is the correct file extension for an Apex class created in Salesforce DX?
24Which SOQL aggregate function should a developer use to count the exact number of rows returned by a query without retrieving the records into memory?
25A 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?
26An 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?
27A developer needs to convert a String variable containing a numeric value into an Integer in Apex. Which method should be used?
28Which collection type in Apex stores elements as key-value pairs where each key maps to a single value?
29Which TWO types of triggers can be defined in Apex? Choose 2 options.
30Which TWO primitive data types are natively supported in Apex? Choose 2 options.
31Which TWO statements about SOSL (Salesforce Object Search Language) are true? Choose 2 options.
32Which TWO methods are available on the Database class for performing DML operations with partial success capability? Choose 2 options.
33Which THREE tools or contexts can be used to execute Anonymous Apex code? Choose 3 options.
34Which TWO collection interfaces or classes are provided in Apex? Choose 2 options.
35Which TWO statements about SOQL relationship queries are true? Choose 2 options.
36Which THREE operations can cause an automatic roll back of an entire Apex transaction? Choose 3 options.
37Which TWO methods are used to inspect sObject field metadata dynamically in Apex? Choose 2 options.
38Which THREE design patterns or tools help ensure secure coding practices regarding CRUD and FLS in Apex? Choose 3 options.
39A 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?
40An 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?
41A 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?
42An application uses a SOSL search to find records across multiple objects. Which return type must be used to capture the results in Apex?
43What is the primary purpose of the Model-View-Controller (MVC) design pattern implementation in Lightning Web Components (LWC)?
44Which primitive data type in Apex can represent a specific point in time, including both date and time values?
45A 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?
46A 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?
47A 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?
48A 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?
49Which collection type stores elements as key-value pairs in Apex?
50A 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?
51A 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?
52An 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?
53Which Apex data type is best suited for storing monetary amounts with high precision?
54An 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?
55A developer writes a SOQL query using the FORMAT() keyword. What is the purpose of this keyword?
56Which TWO statements are true regarding the behavior of Apex triggers and context variables? Choose 2 answers.
57Which TWO data types can be used as keys in an Apex Map? Choose 2 answers.
58Which THREE statements are accurate regarding Apex transaction control and database savepoints? Choose 3 answers.
59Which THREE best practices should a developer follow when implementing CRUD and FLS checks in Apex? Choose 3 answers.
60Which TWO features are characteristics of SOSL (Salesforce Object Search Language) queries? Choose 2 answers.
61Which THREE techniques help prevent hitting governor limits when writing SOQL queries in Apex? Choose 3 answers.
62Which THREE factors can cause an Apex CPU time limit exception in a synchronous transaction? Choose 3 answers.
63An 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?
64A 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?
65A 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?
66A 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?
67A 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?
68A developer needs to check if a specific key exists in a Map<String, Decimal> before retrieving its value. Which Map method should be used?
69A 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?
70An 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?
71Which THREE data types are primitive data types supported in Apex? (Choose three.)
72A 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.)
73Which THREE collections are available in Apex? (Choose three.)
74A 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.)
75A developer needs to apply a custom discount to a list of Opportunity records and then persist the changes to Salesforce. The logic must be reusable both from an Apex trigger and from an Apex controller invoked by a Lightning web component. Which approach best satisfies the requirement while following Apex best practices?
76A developer is writing an Apex trigger on the Case object that updates the Case's Status field based on the Priority. The trigger must handle bulk updates and avoid recursion. Which approach should the developer take to prevent the trigger from firing again when the Case records are updated by the trigger itself?
Be able to read Apex snippets and state whether they compile and which governor limit they hit. The single most important habit: keep SOQL and DML outside loops and use Database methods when partial success is required.
The Courseiva SALESFORCE-PD1 question bank contains 76 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