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 56 discussion

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

A developer is writing a Visualforce page that queries accounts in the system and presents a data table with the results. The users want to be able to filter the results based on up to five fields. However, the users want to pick the five fields to use as filter fields when they run the page.
Which feature of Apex code is required to facilitate this solution?

  • A. SOSL queries
  • B. describeSObjects()
  • C. Dynamic Schema binding
  • D. REST API
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
AnhTH
Highly Voted 1 year, 10 months ago
I think B is correct answer because only has "dynamic visualforce binding", not "dynamic schema binding". https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_dynamic_vf.htm
upvoted 7 times
...
santo_aj
Most Recent 3 months, 3 weeks ago
Selected Answer: B
But they talking about getting the list of fields to display a multi select list for them to select so B would be right
upvoted 1 times
...
santo_aj
3 months, 3 weeks ago
Selected Answer: C
C is the correct answer. https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_dynamic_vf.htm
upvoted 2 times
...
santo_aj
3 months, 3 weeks ago
C is the correct answer. https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_dynamic_vf.htm
upvoted 1 times
...
cPickle
4 months, 2 weeks ago
Selected Answer: C
C is correct. Question asked "Apex code". Dynamic schema binding allows developers to write Apex code that dynamically references custom or standard Salesforce objects, fields, and relationships based on user selections or dynamic criteria. In this case, the users want to pick the five fields to use as filter fields when they run the page. With dynamic schema binding, the Apex code can read the user selections and dynamically construct a query that includes the selected fields as filter criteria.
upvoted 2 times
...
thneeb
6 months, 3 weeks ago
Selected Answer: B
B. They use it to give the user the choice, which fields he wants to filter on. SOSL can be used as well and can be limited to one SObject, but the search cannot be adjusted to specific fields.
upvoted 1 times
...
lorenac2
8 months ago
I honestly would throw this question out. It would be better to use dynamic SOQL, not SOSL, because we are searching a single object. I don't see B being relavent as describeSobjects() provides a list of describe results for, generally, a list of sObjects. Again, we are only interested in one. D is irrelavent as the information is already in the org. C doesn't seem to be a thing, so unless there is a typo here and should be simplified to 'dynamic apex', then C is wrong as well.
upvoted 2 times
...
ChiaSam
1 year, 2 months ago
Selected Answer: B
B seems to be correct as requirement is to dynamically select the fields at run time, which we can achieve with describeSObjects() by fetching all fields. Option A says SOSL queries, rather than dynamic SOSL.
upvoted 1 times
...
KK13
1 year, 7 months ago
Selected Answer: A
Why not A it is clear that user needs to search via SOSL fields (5)? https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_dynamic_sosl.htm
upvoted 1 times
...
CraigJ
2 years, 3 months ago
I think they talking about getting the list of fields to display a multi select list for them to select so B would be right
upvoted 4 times
...
gagangupta
2 years, 7 months ago
It should be C.
upvoted 4 times
Pricha
1 year, 11 months ago
C would if they are talking the querying
upvoted 1 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 ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago