Cyber Monday 2024! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Salesforce Exam DEX-450 Topic 4 Question 100 Discussion

Actual exam question for Salesforce's DEX-450 exam
Question #: 100
Topic #: 4
[All DEX-450 Questions]

A developer deployed a trigger to update the status__c of Assets related to an Account when the Account''s status changes and a nightly integration that updates Accounts in bulk has started to fail with limit failures.

What should the developer change about the code to address the failure while still having the code update all of the Assets correctly?

Show Suggested Answer Hide Answer
Suggested Answer: A

Contribute your Thoughts:

Solange
2 months ago
Option A is just asking for trouble. Trying to process all Accounts in one call? That's just begging for a governor limit exception.
upvoted 0 times
Tegan
1 months ago
Yeah, Option A sounds like a disaster waiting to happen. Processing all Accounts at once is a sure way to hit governor limits.
upvoted 0 times
...
Jess
2 months ago
I agree, breaking up the processing into smaller chunks will help prevent limit failures. Option A is too risky.
upvoted 0 times
...
Jina
2 months ago
Option A is definitely risky. It's better to process the Accounts in smaller batches to avoid hitting governor limits.
upvoted 0 times
...
...
Colette
2 months ago
Haha, this question is a real head-scratcher. I'm just glad I'm not the one who has to figure it out!
upvoted 0 times
...
Sherita
2 months ago
I think moving all the logic to a Queueable class and calling it from the trigger could also be a good option.
upvoted 0 times
...
Agustin
2 months ago
D is the way to do it! Iterating over the Assets list directly is the most straightforward approach in my opinion.
upvoted 0 times
Krystina
1 months ago
Let's go with option D then, hopefully it will fix the issue with the bulk updates.
upvoted 0 times
...
Geraldine
1 months ago
That makes sense, it should help address the failure with the nightly integration.
upvoted 0 times
...
Blair
1 months ago
Agreed, iterating over the Assets list directly seems like the way to go.
upvoted 0 times
...
Josephine
2 months ago
I think D is the best option too. It's the most straightforward approach.
upvoted 0 times
...
...
Bernadine
2 months ago
I agree with Viola, changing the code to process all Accounts in one call seems like the best solution.
upvoted 0 times
...
Marcelle
3 months ago
I'd go with option B. Limiting the number of Assets queried per Account is a simple and effective solution.
upvoted 0 times
Marjory
2 months ago
Let's hope it solves the issue.
upvoted 0 times
...
Vicky
2 months ago
It should help with the limit failures during the nightly integration.
upvoted 0 times
...
Precious
2 months ago
That sounds like a good idea.
upvoted 0 times
...
Leigha
2 months ago
B) Add a LIMIT clause to the SOQL query on line 16 to limit the number of Assets queried for an Account.
upvoted 0 times
...
...
Viola
3 months ago
I think the developer should change the code to process all Accounts in one call.
upvoted 0 times
...
Dino
3 months ago
Option C seems like the way to go. Queueable classes are perfect for handling bulkier operations like this without hitting limits.
upvoted 0 times
Cheryl
2 months ago
Yes, it's a good choice to avoid hitting limits.
upvoted 0 times
...
Brittani
2 months ago
I agree, Queueable classes are great for bulk operations.
upvoted 0 times
...
...

Save Cancel