Salesforce Certified Platform Developer practice exam
The real exam has 60 questions, lasts 105 minutes and needs 68% to pass. Start with a free 20-question diagnostic, no account needed.
Start the free diagnostic
Exam sections and weights
Sample questions
A nightly Apex job at an airline recalculates loyalty points and runs several queries and DML statements per transaction. Before running another query, the code must check how many SOQL queries the current transaction has already consumed. Which Apex class exposes this information?
- System.Governor, which returns current usage for every governor limit in the org
There is no System.Governor class in Apex. - OrgLimits, which returns org-wide allocations such as daily API requests and storage
OrgLimits reports org-level allocations such as API calls and storage, not per-transaction governor usage. - Limits, which offers static methods such as getQueries() and getLimitQueries() for the current transaction (Answer)
Correct. Limits.getQueries() and the related Limits methods return real-time usage for the current transaction. - AsyncLimits, which tracks limit usage only for Batch Apex and Queueable jobs
There is no AsyncLimits class; asynchronous jobs also use the Limits class.
A veterinary clinic stores each Pet__c and its Checkup__c records. Every checkup must belong to a pet, and the Pet__c page must show the total number of checkups and the latest checkup date without code. Which relationship should be created on Checkup__c?
- A lookup relationship to Pet__c
Lookup relationships do not support native roll-up summary fields. - A master-detail relationship to Pet__c (Answer)
Correct. A master-detail field on the child makes each checkup require a pet and enables roll-up summaries on Pet__c. - A master-detail relationship on Pet__c that points to Checkup__c
The relationship field must be on the child; putting it on Pet__c would make each pet belong to one checkup. - An external lookup relationship to Pet__c
External lookups relate to external objects and do not support roll-up summaries.
Some code runs without errors in Execute Anonymous in a sandbox, but the same logic fails when run as an Apex test. What is the most likely reason?
- The code calls a future method, which never runs in a test.
Future methods do run in tests, for example when Test.stopTest() is called. - Execute Anonymous does not enforce governor limits.
Governor limits apply in Execute Anonymous as well. - The code depends on records that exist in the sandbox but are not visible in the isolated test context. (Answer)
Correct. Tests run without access to org data unless they create it or use SeeAllData. - Execute Anonymous ignores compilation errors.
Code with compilation errors cannot run in either context.
Questions are original and follow the official exam guide. Praxis Academy is not affiliated with Salesforce, Inc.