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
Sylvia
26 days ago
I disagree, deactivating the trigger might be a better approach.
upvoted 0 times
...
Annabelle
1 month ago
Option D is the best choice! Try-catch blocks are essential for error handling.
upvoted 0 times
...
Kristal
2 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
2 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
2 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
2 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