Activity Forums Salesforce® Discussions What is difference insert() and database .insert() in Salesforce?

  • Deepak

    Member
    February 24, 2020 at 10:09 am

    Hi Ratnesh,

    In case of DML statement (insert),  in bulk operation if error occurs, the execution will stop and Apex code throws an error which can be handled in try catch block.
    While in DML database methods (Database.insert) used, then if error occurs the remaining records will be inserted / updated means partial DML operation will be done.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos