Valid CRT-450 Dumps shared by ExamDiscuss.com for Helping Passing CRT-450 Exam! ExamDiscuss.com now offer the newest CRT-450 exam dumps, the ExamDiscuss.com CRT-450 exam questions have been updated and answers have been corrected get the newest ExamDiscuss.com CRT-450 dumps with Test Engine here:
Which statement should be used to allow some of the records in a list of records to be inserted if others fail to be inserted?
Correct Answer: A
The statement Database.insert (records, false) should be used to allow some of the records in a list of records to be inserted if others fail to be inserted. This statement uses the Database class method insert with the allOrNone parameter set to false. This means that the operation allows partial success, and if some records fail, the remainder of the DML operation can still succeed. The method returns a list of Database.SaveResult objects, which contain the status and error information for each record. The developer can use this information to handle the failed records accordingly. The other statements either use the standard DML statement insert, which rolls back the entire transaction if any record fails, or use the allOrNone parameter set to true, which has the same effect as the standard DML statement. References: Database Class, Inserting and Updating Records, Database.insert(list,false) in apex