Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Salesforce DEX-450 Exam - Topic 4 Question 126 Discussion

A developer created a new after insert trigger on the Lead object that creates Task records for each Lead.After deploying to production, an existing outside integration that inserts Lead records in batches to Salesforce is occasionally reporting total batch failures being caused by the Task insert statement. This causes the integration process in the outside system to stop, requiring a manual restart.Which change should the developer make to allow the integration to continue when some records in a batch cause failures due to the Taskinsert statement, so that manual restarts are not needed?
A) Use the Database method with allow one set to false.
B) Deactivate the trigger before the integration runs.
C) Remove the Apex class from the integration user's profile.
D) Use a try-catch block after the insert statement.

Salesforce DEX-450 Exam - Topic 4 Question 126 Discussion

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

A developer created a new after insert trigger on the Lead object that creates Task records for each Lead.

After deploying to production, an existing outside integration that inserts Lead records in batches to Salesforce is occasionally reporting total batch failures being caused by the Task insert statement. This causes the integration process in the outside system to stop, requiring a manual restart.

Which change should the developer make to allow the integration to continue when some records in a batch cause failures due to the Task

insert statement, so that manual restarts are not needed?

Show Suggested Answer Hide Answer
Suggested Answer: A

Contribute your Thoughts:

0/2000 characters
Kerry
3 days ago
True, but it might not handle the errors as cleanly as D.
upvoted 0 times
...
Sharen
8 days ago
But what about option A? It could allow partial success too.
upvoted 0 times
...
Henriette
13 days ago
I agree with Kerry. It prevents the whole batch from failing.
upvoted 0 times
...
Kerry
18 days ago
I think option D is the best. A try-catch block can handle errors gracefully.
upvoted 0 times
...
Sharen
23 days ago
This question is tricky. I feel like it’s testing our understanding of error handling.
upvoted 0 times
...
Natalie
29 days ago
Yeah, I wouldn't go with B. We need the trigger for other leads.
upvoted 0 times
...
Clorinda
1 month ago
Deactivating the trigger seems risky. What if it causes other issues?
upvoted 0 times
...
Adelle
1 month ago
True, but I feel like try-catch gives more control over the errors.
upvoted 0 times
...
Rebbeca
1 month ago
But what about option A? It could help with partial successes too.
upvoted 0 times
...
Amber
2 months ago
I agree, try-catch can handle errors without stopping everything.
upvoted 0 times
...
Georgeanna
2 months ago
This question is tricky! I think option D is the best choice.
upvoted 0 times
...
Carlota
2 months ago
Removing the Apex class seems extreme and unnecessary.
upvoted 0 times
...
Clement
2 months ago
Using allow one set to false can help too, but it's not the full solution.
upvoted 0 times
...
Kelvin
2 months ago
Surprised that this is causing batch failures! Didn't expect that.
upvoted 0 times
...
Sylvia
4 months ago
I disagree, deactivating the trigger might be a better approach.
upvoted 0 times
...
Annabelle
4 months ago
Option D is the best choice! Try-catch blocks are essential for error handling.
upvoted 0 times
...
Kristal
5 months ago
I feel like removing the Apex class from the integration user's profile doesn't really address the issue with the Task insert.
upvoted 0 times
...
Alverta
5 months ago
I practiced a similar question where using the Database method with allow one set to false helped avoid batch failures.
upvoted 0 times
...
Candida
5 months ago
I'm not entirely sure, but I think deactivating the trigger could be risky since it would stop all Task creation.
upvoted 0 times
...
Celestina
5 months ago
I remember something about using try-catch blocks to handle exceptions in Apex. That might help with the Task insert failures.
upvoted 0 times
...

Save Cancel