+ Start a Discussion
ksandipam1.3911488281559465E12ksandipam1.3911488281559465E12 

Stop revert back DML operation, when I through the exception

@Httpget
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.

http://www.salesforce.com/us/developer/docs/apexcode/index_Left.htm#StartTopic=Content/apex_System_Database_insert_2.htm


Maros Sitko
Salesforce developer
www.cassacloud.com