You need to sign in to do that
Don't have an account?

Apex code
Can anyone help.
If i am doing an operation of inserting some values in an object using a loop.
Account a=new Account(); for(Integer j=0;j<5;j++) { a.put(l[j],inputvalues[j]); } Here inputvalues and l array contains the following values: l[j] inputvalues[j] Name Neha Accountnumber 5023 If suppose there occurs some error during "put" operation then i get the error in Visual Force page Instead of this i want an error in some other resource like a variable or list item and my operation of insert should not stop. Anyone has a solution to this. Please help with some sample code.
Thanks.
hi ,
try mapping the field of account.
eg
Account a=new Account();
for(Integer j=0;j<5;j++)
{
a.name=d;
}
thanks,
Harsha
Well you can always catch the errors using try catch