Activity Forums Salesforce® Discussions How database methods different from DML statements in Salesforce? Reply To: How database methods different from DML statements in Salesforce?

  • Archit

    Member
    January 11, 2018 at 3:05 am

    Hello Ankit,

    In Apex you can perform dml operation in two different ways:

    • DML statements
    • Database class methods

    For partial successful results you have a choice to opt database methods because through these, if any operation get halted due to any errors in between it can perform action on rest other records leaving behind those who has an errors. While in DML, it can either perform complete operation (if no errors) or if there is any error comes in between it halts a running operation and also rolled back the other records at where the operation has already performed.

    Hope this answer would be helpful!!