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

Salesforce Interview Questions and Answers - For Freshers and Experienced Candidates

Video in

Learn most important Salesforce Interview Questions and Answers, asked at every interview. These Interview questions will be useful to all entry-level candidates, beginners, interns, and…