PDII Exam Questions & Answers
Salesforce Certified Platform Developer II (old) • Salesforce
100% money-back guarantee
Sample PDII Questions
Practice with real exam-style questions, each with the verified correct answer and explanation.
An Apex class does not achieve expected code coverage. The testsetup method explicitly calls a method In the Apex class..
How can the developer generate the code coverage?
When an Apex class does not achieve the expected code coverage, it suggests that the test methods are not executing parts of the class. The @testvisible annotation can be used to increase code coverage by allowing test methods to access private or protected members of another class. This enables the test method to call methods that may not be directly accessible, but it is not a direct means to generate code coverage. The code coverage is actually achieved when the test methods execute the code within these methods. Therefore, to properly generate code coverage, the developer must ensure that the test methods call the relevant portions of the code that need to be covered. The use of @testvisible can facilitate this process by making otherwise inaccessible code available for testing.
Apex Developer Guide - Testing Best Practices
Apex Developer Guide - @testVisible Annotation
Consider the following code snippet:

How should the component that an order has been selected by the user?
Create and dispatch a custom event. This approach allows LWC components to communicate effectively, maintaining component encapsulation and reusability.
Universal Containers decided to use Salesforce to manage a new hire interview process. A custom object called Candidate was created with organization-wide defaults set to Private. A lookup on the Candidate object sets an employee as an Interviewer.
What should be used to automatically give Read access to the record when the lookup field is set to the Interviewer user?
A sharing rule can be used to automatically give Read access to a user specified in a lookup field. Sharing rules are declarative and can be based on criteria such as the value of a lookup field. This can be done without writing code and is maintainable through the Salesforce UI.
A developer is responsible for formulating the deployment process for a Salesforce project. The project follows a source-driven development approach, and the developer wants to ensure efficient deployment and version control of the metadata changes.
Which tool or mechanism should be utilized for managing the source-driven deployment process?
Salesforce CLI with Salesforce DX is the best tool for managing a source-driven deployment process. It facilitates version control, scriptable deployment, and rollback, and is optimized for collaboration and continuous integration.
A developer is trying to access org data from within a test class.
Which sObject type requires the test class to have the (seeAllData=true)
annotation?
https://salesforce.stackexchange.com/questions/149110/when-is-it-appropriate-to-use-seealldata-true
Get access to all 202 verified questions with detailed answers.
Unlock All PDII Questions