Activity Forums Salesforce® Discussions How can I rolled back my class when it runs into exception in salesforce?

  • Joe Dias

    Member
    September 28, 2016 at 10:04 am

    If business rules require that partial work (already executed DML statements) be “rolled back” so that the processing can continue in another direction. Apex gives you the ability to generate a savepoint, that is, a point in the request that specifies the state of the database at that time. Any DML statement that occurs after the savepoint can be discarded, and the database can be restored to the same condition it was in at the time you generated the savepoint.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos