Platform-Developer-II Dumps

Platform-Developer-II Free Practice Test

Salesforce Platform-Developer-II: Platform Developer II

QUESTION 96

- (Exam Topic 1)
Global with sharing class MyRemoter { public String accountName { get; set; } public static Account account
{ get; set; } public AccountRemoter(} {} @RemoteAction global static Account getAccount (String acccuntName) { account = [SELECT Id, Name, NumberOfEmployees FROM Account WHERE Name =
:accountName]; return account; } } Consider the Apex class above that defines a RemoteAction used on a
Visualforce search page. Which code snippet will assert that the remote action returned the correct Account?

Correct Answer: B

QUESTION 97

- (Exam Topic 1)
The REST API .

Correct Answer: B

QUESTION 98

- (Exam Topic 1)
A developer wrote a trigger on Opportunity that will update a custom Last Sold Date field on the Opportunity's Account whenever an Opportunity is dosed. In the test class for the trigger, the assertion to validate the Last Sold Date field fails.
What might be causing the failed assertion?

Correct Answer: B

QUESTION 99

- (Exam Topic 1)
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?

Correct Answer: C

QUESTION 100

- (Exam Topic 3)
Which statement is considered a best practice for writing bulk safe Apex Triggers?

Correct Answer: C