Exam PDII Topic 2 Question 155 Discussion

Actual exam question for Salesforce's PDII exam
Question #: 155
Topic #: 2
A developer has a Visualforce page that automatically assigns ewnership of an Account to a queue upon save.
The page appears to correctly assign ownership, but an assertion validating the correct ownership fails.
What can cause this problem?

Suggested Answer: A Vote an answer

If the test class does not retrieve the updated value from the database, it will not see any changes made by the page logic. This can cause assertions that check for those changes to fail. The test should query for the most recent value from the database after the operation that is supposed to update the value.
References: Apex Developer Guide - Testing Best Practices

by Greg at Jul 17, 2026, 01:19 AM

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
Nick name: Submit Cancel
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

0
0
0
10