exam questions

Exam CRT-450 All Questions

View all questions & answers for the CRT-450 exam

Exam CRT-450 topic 1 question 251 discussion

Actual exam question from Salesforce's CRT-450
Question #: 251
Topic #: 1
[All CRT-450 Questions]

Refer to the following code snippet for an environment has more than 200 Accounts belonging to the ‘Technology’ industry:



When the code executes, what happens as a result of the Apex transaction?

  • A. The Apex transaction succeeds regardless of any uncaught exception and all processed accounts are updated.
  • B. If executed in a synchronous context, the Apex transaction is likely to fail by exceeding the DML governor limit.
  • C. The Apex transaction fails with the following message: SObject row was retrieved via SOQL without querying the requested field: Account.Is_Tech__c.
  • D. If executed in an asynchronous context, the Apex transaction is likely to fail by exceeding the DML governor limit.
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
rajivjm
5 days, 21 hours ago
Selected Answer: A
I dont agree with C. Because it is enough to query Id, since anyways the collection is a list of Sobjects. SO as long as we are querying the ID, it is enough to update any field in the record. So I don't believe this code will run into an error. SO for me the answer is A
upvoted 1 times
...
SS1121
5 months, 2 weeks ago
Selected Answer: A
A is correct
upvoted 1 times
...
JPV85
12 months ago
Answ. A
upvoted 1 times
...
SanjeevOnForce
1 year, 1 month ago
i think A is correct as the query has a limit of 150 and the DML Limit is also 150
upvoted 1 times
...
irina_735
1 year, 2 months ago
You can update fields without querying in SOQL (you can`t get the values from them without querying) So, A is correct
upvoted 1 times
...
irina_735
1 year, 2 months ago
None of the answers are correct. Two interesting things: 1) you CAN update fields without querying in SOQL, but you can`t get the values from them without querying. 2) This snippet makes another error: System.LimitException: Too many SOQL queries: 101
upvoted 2 times
irina_735
1 year, 2 months ago
There was a bloblem with trigger, correct answer is A
upvoted 1 times
...
...
BrucePark
1 year, 4 months ago
DML limit is 150 so B wouldn't be correct. C seems correct answer....?
upvoted 2 times
...
BrucePark
1 year, 4 months ago
I also haven't tested it but B seems more correct
upvoted 2 times
...
wlthorn
1 year, 8 months ago
B is correct?
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 ...