Valid PDI Dumps shared by ExamDiscuss.com for Helping Passing PDI Exam! ExamDiscuss.com now offer the newest PDI exam dumps, the ExamDiscuss.com PDI exam questions have been updated and answers have been corrected get the newest ExamDiscuss.com PDI dumps with Test Engine here:
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 failure due to the Task insert statement, so that manual restarts are not needed?
Correct Answer: D
Using Database.insert with allOrNone=false allows partial success in DML operations. Option D: Use the Database method with allOrNone set to false. Records that cause errors are not inserted. Successful records are committed. Prevents the entire batch from failing. Why Not Other Options: Option A: Deactivating the trigger is not practical. Option B: Removing the class from the profile may cause other issues. Option C: A try-catch block won't prevent the batch from failing. Reference: Database Methods: "Use the Database DML methods to specify whether or not to allow partial record processing." - Apex Developer Guide: Using the Database Class