Salesforce Certified Platform Developer - Plat-Dev-201 Exam Practice Test

Question 1
A custom object Trainer_c has a lookup field to another custom object Gym___c. Which SOQL query will get the record for the Viridian City gym and it's trainers?

Correct Answer: C
Question 2
A developer has a single custom controller class that works with a Visualforce Wizard to support creating and editing multiple subjects. The wizard accepts data from user inputs across multiple Visualforce pages and from a parameter on the initial URL. Which three statements are useful inside the unit test to effectively test the custom controller? Choose 3 answers

Correct Answer: C,D,E
Question 3
A custom picklist field, Food_Preference__c, exist on a custom object. The picklist contains the following options: 'Vegan','Kosher','No Preference'. The developer must ensure a value is populated every time a record is created or updated. What is the most efficient way to ensure a value is selected every time a record is saved?

Correct Answer: C
Question 4
Given the following code snippet, that is part of a custom controller for a Visualforce page:

In which two ways can the try/catch be enclosed to enforce object and field-level permissions and prevent the DML statement from being executed if the current logged-in user does not have the appropriate level of access? Choose 2 answers

Correct Answer: A,B
Question 5
In the following example, which sharing context will myMethod execute when it is invoked?

Correct Answer: D
Question 6
Universal Containers wants to back up all of the data and attachments in its Salesforce org once month. Which approach should a developer use to meet this requirement?

Correct Answer: B
Explanation: Only visible for Actualtests4sure members. You can sign-up / login (it's free).
Question 7
Refer to the following Apex code:

What is the value of x when it is written to the debug log?

Correct Answer: A
Question 8
A developer is debugging the following code to determinate why Accounts are not being created Account a = new Account(Name = 'A'); Database.insert(a, false); How should the code be altered to help debug the issue?

Correct Answer: C
Question 9
A developer created a Visualforce page and custom controller to display the account type field as shown below.
Custom controller code:

Visualforce page snippet:

The value of the account type field is not being displayed correctly on the page. Assuming the custom controller is properly referenced on the Visualforce page, what should the developer do to correct the problem?

Correct Answer: C
Question 10
A development team wants to use a deployment script to automatically deploy to a sandbox during their development cycles.
Which two tools can they use to run a script that deploys to a sandbox? Choose 2 answers

Correct Answer: A,C
Question 11
A Next Best Action strategy uses an Enhance element that invokes an Apex method to determine a discount level for a Contact, based on a number of factors.
What is the correct definition of the Apex method?

Correct Answer: D
Question 12
How does the Lightning Component framework help developers implement solutions faster?

Correct Answer: B