You need to sign in to do that
Don't have an account?
Force.com
How to execute remaining records after entering into Catch Block ?
While parsing an XML file with 10 records, it fails at 6th record. It then enters in catch block and prints an error statement.
But i want to process the remaining 3 records also.
Is there any way to process the remaining records also, plz help.
Can you tell us a bit more about how you are parsing the XML? It rather depends if this is a recoverable error or not.
Thanks for your reply but I am able to parse the xml file, thats not the issue.
Here is the sample code:
AccountList is an array and it is auto-populated, but half way through, it fails at some point and catch block gets executed. Now i want to process rest records also present in AccountList.
Plz help.
Use Database upsert opt_allOrNone option
Database Method Syntax
•
UpsertResult Database.Upsert(sObject recordToUpsert, Schema.SObjectField External_ID_Field, Booleanopt_allOrNone
)•
UpsertResult[] Database.Upsert(sObject[] recordsToUpsert, Schema.SObjectField External_ID_Field, Booleanopt_allOrNone
)