Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam Certified Platform Developer II All Questions

View all questions & answers for the Certified Platform Developer II exam

Exam Certified Platform Developer II topic 1 question 123 discussion

Actual exam question from Salesforce's Certified Platform Developer II
Question #: 123
Topic #: 1
[All Certified Platform Developer II Questions]

A developer must create a custom pagination solution. While users navigate through pages, if the data is changed from elsewhere, users should still see the cached results first accessed.
How can the developer meet these requirements?

  • A. Use @Cache annotation
  • B. Use a StandardSetController
  • C. Use OFFSET in SOQL queries
  • D. Use OFFSET WITH CACHE in SOQL queries
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
Liquad
Highly Voted 3 years, 2 months ago
OFFSET is applied to the result set returned at the time of the query. No server-side cursor is created to cache the full result set for future OFFSET queries. The page results may change if the underlying data is modified during multiple queries using OFFSET into the same result set. As an example, suppose that the following query normally returns a full result set of 50 rows, and the first 10 rows are skipped using an OFFSET clause:
upvoted 5 times
...
beardAnt
Most Recent 1 month, 1 week ago
Selected Answer: B
b
upvoted 1 times
...
Sapphire808
1 year, 1 month ago
Selected Answer: B
Standard set controller with caching logic implemented
upvoted 1 times
...
Liquad
3 years, 2 months ago
Pros · Manages data sets on the server, which reduces page state and increases performance · Allows you to paginate over large data sets that have up to 10,000 records · Includes built-in functionality such as next, previous, first, last, getResultSize, and other methods that can simplify your page · Allows you to paginate forward and backward or to any page within the result set · Uses a server-side cursor to cache the entire result set, so results will not change if data changes in the database while a user is paginating from one page to the next Cons · Has built-in functionality that results in a very small increase in view state size · Can be used only in Apex
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
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.

SaveCancel
Loading ...