Salesforce PD1 Exam Mock Test - 1
Welcome to your Salesforce PD1 Exam Mock Test
Total Questions: 60
Duration: 105 minutes
Pass Score: 39 (65%)
Date: July 6, 2025
1.
A trigger needs to handle recursive updates. What is the best approach?
2.
A Visualforce page needs to display a picklist for the Account.Type field. Which tag should be used?
3.
A developer needs to handle a NullPointerException in an Apex method. What is the best approach?
4.
A Lightning Web Component needs to display Account data reactively. Which approach should the developer use?
5.
A developer needs to enforce record-level security. Which feature should they use?
6.
A developer needs to retrieve all Opportunities with an Amount greater than $10,000. Which SOQL query is correct and optimized?
7.
A page needs to include a static resource. Which tag is used?
8.
How can an LWC handle errors from an Apex call?
9.
A page needs to display a related list of Contacts for an Account. Which tag is used?
10.
What is the minimum code coverage required for deploying Apex code to production?
11.
A developer needs to bulkify an Apex trigger to handle 200 records. What should they do?
12.
What does SELECT Id, Name FROM Account WHERE CreatedDate = TODAY return?
13.
A developer needs to include JavaScript in a Visualforce page. Which tag is used?
14.
A page needs to display an error message. Which tag is used?
15.
When should a developer use a before trigger instead of an after trigger?
16.
What is the purpose of the WITH SECURITY_ENFORCED clause?
17.
A trigger processes 500 records but fails due to a governor limit. What is likely the issue?
18.
A trigger needs to update a field on the same object. Which context is best?
19.
What is the purpose of FOR UPDATE in a SOQL query?
20.
A developer needs to pass a parameter to a controller method. Which attribute is used?
21.
A developer needs to execute a method after a delay. Which approach is best?
22.
What does the query SELECT Id, Name FROM Opportunity WHERE StageName IN ('Closed Won', 'Closed Lost') return?
23.
A developer wants to bulkify a trigger. What is the best practice?
24.
A developer sees a “Too many DML statements” error. What is the likely cause?
25.
How can an LWC access a record’s fields?
26.
What is the purpose of the @TestSetup annotation?
27.
A developer creates an LWC to display a picklist. Which HTML tag is used?
28.
A test class calls an @future method. How should the test handle asynchronous code?
29.
A page needs to display a dynamic table. Which tag is best?
30.
A developer needs to debug Apex code. Which tool is most appropriate?
31.
A developer writes a test class for an Apex method. What is a best practice?
32.
A test class for an Apex controller must simulate user interaction. What annotation is required for test methods?
33.
An Aura component needs to access a record ID. Where is it stored?
34.
A developer builds a dynamic SOQL query with user input. How can SOQL injection be prevented?
35.
A test class needs to verify a trigger’s behavior. What should be included?
36.
A developer needs to call an external API. Which class should be used?
37.
What does SELECT Id, Name FROM Account LIMIT 10 do?
38.
A developer deploys a change set. What is a prerequisite?
39.
A test method needs to create test data. What is the best practice?
40.
A developer needs to send an email from Apex. Which class is used?
41.
A test class needs to simulate a guest user. What is used?
42.
A developer schedules a job to run daily. Which interface is used?
43.
What is the maximum number of SOQL queries allowed in a single Apex transaction?
44.
What is the maximum number of callouts per Apex transaction?
45.
How can an LWC dispatch a custom event?
46.
A developer wants to pass a record ID to an LWC. Which decorator should be used?
47.
A developer needs to call an external API from Apex. What is required?
48.
What does the System.assertEquals() method do in a test class?
49.
How can an Aura component refresh its data?
50.
What does SELECT COUNT() FROM Contact WHERE AccountId = :accId return?
51.
How can a custom controller redirect to another page?
52.
An Aura component needs to handle a component event. What is required?
53.
What does SELECT Id, (SELECT Id FROM Opportunities) FROM Account return?
54.
How can an Aura component handle a server-side Apex call?
55.
A page needs to refresh after a button click. Which attribute enables this?
56.
A trigger on Opportunity updates related Account records. When should the DML operation occur?
57.
What is the maximum heap size for synchronous Apex?
58.
A batch Apex job updates Case records. What interface must the class implement?
59.
What does SELECT Id, Name FROM Account ORDER BY Name DESC do?
60.
A developer needs to process records asynchronously. Which approach is best for a one-time job?