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

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

A developer has a requirement to query three fields (Id, Name, Type) from an Account; and first and last names for all Contacts associated with the Account.

Which option is the preferred, optimized method to achieve this for the Account named 'Ozone Electronics'?

  • A.
  • B.
  • C.
  • D.
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
tester1987
10 months, 3 weeks ago
Selected Answer: B
D will throw error 'List has no rows for assignment to SObject' , as you are storing the list of Accounts into a variable
upvoted 1 times
...
Sapphire808
1 year, 1 month ago
D. B does not work, it returns unknown parsing error, and D is the simplest to execute.
upvoted 1 times
M4JK3LSON
11 months ago
It doesn't returns any mentioned by you error, B is correct answer and consume just 1 soql instand of 2 like in D answer
upvoted 2 times
...
...
BrucePark
1 year, 3 months ago
There is a same question previously. The answer was D.
upvoted 1 times
...
Ike300
1 year, 7 months ago
Selected Answer: B
Parent to child query can do this in one shot which is optimized
upvoted 4 times
...
Ullr
1 year, 8 months ago
B and it works
upvoted 4 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 ...