function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Stop revert back DML operation, when I through the exception

global static <Apexclass> config() {
         try {

          } catch ( Exception configException ) {
               // DML operation inserting a new record
              throw new <Custom Exception>;

When I execute it, I was able to throw the exception, but DML operation is reverting back. I want to stop the revert back operation and want to throw the exception. Is it possible ??
Maros SitkoMaros Sitko
I do not no if it whrow exception, but if you use Database.insert(<list>, false); it will insert only records which is correct.

Maros Sitko
Salesforce developer