Created
September 28, 2012 16:30
-
-
Save dancinllama/3800800 to your computer and use it in GitHub Desktop.
partial success handling
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//sobjList is my array of records inserted.. | |
this.currentIndex = 0; | |
for(Database.SaveResult sr : Database.insert(objects,false)){ | |
if(!sr.success){ | |
exceptions.add(createException(batchId,sr.getErrors().get(0),sobjList.get(currentIndex))); | |
} | |
currentIndex++; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment