Play Games

Search This Blog

Wednesday, January 20, 2016

Difference between insert and Database.insert() in salesforce(difference b/w DML statements and Database class methods).

Difference between insert and Database.insert() in salesforce(difference b/w DML statements and Database class methods).

By using the Database class method(eg.Database.insert()), we can specify whether or not to allow for partial record processing if errors are encountered where as in DML statements(insert) we cannot.
It means eventhough errors are present while doing insert/update/delete operation,if we use Database methods, process will continue where as in DML statements, the process will get stopped and error is thrown away.

No comments:

Post a Comment