Sample questions
Salesforce Certified Platform Developer I (SALESFORCE-PD1) practice questions
Which TWO methods are available on the Database class for performing DML operations with partial success capability? Choose 2 options.
Which Apex data type should a developer use to represent a precise geographic location with latitude and longitude coordinates?
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…
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?
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?
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?
Which THREE tools or contexts can be used to execute Anonymous Apex code? Choose 3 options.
Which TWO trigger context variables are available in BEFORE INSERT triggers? Choose 2 options.
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?
An application has a requirement to query records owned by subordinate users in the role hierarchy using Apex. Which SOQL feature supports this capability?
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?
Which TWO statements about Apex variables and initialization are true? Choose 2 options.
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 excepti…
A developer needs to execute a dynamic SOQL query where the object name and fields are determined at runtime. Which method should be used?
Which type of Apex trigger context variable returns a list of new versions of the sObject records?
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 sh…
Which TWO collections are valid in Apex and maintain the insertion order of their elements? Choose 2 answers.
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 place…
Which TWO methods are used to inspect sObject field metadata dynamically in Apex? Choose 2 options.
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?
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 b…
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?
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…
Which THREE techniques help prevent hitting governor limits when writing SOQL queries in Apex? Choose 3 answers.