You need to sign in to do that
Don't have an account?
Sachin Patil 57
How to get only the record values from a databse.saveresult list if the insertion fails.
Hi,
I am in part whereI need to get the failed records in a CSV. I am able to get the failed records into a CSV but the records are coming with the fieldNames as I have added the screenshot below. But I dont want the fields coming with the field Names and object Name.Please Someone help me in getting only the record values
Thanks in Advance
Sachin
I am in part whereI need to get the failed records in a CSV. I am able to get the failed records into a CSV but the records are coming with the fieldNames as I have added the screenshot below. But I dont want the fields coming with the field Names and object Name.Please Someone help me in getting only the record values
Thanks in Advance
Sachin
I guess you work with a list. Try to remove the first entry of the list - xyz.remove(0)
Olli
The CSV I got is with the String. The String I have used is
String errorRecords+= insertRecords[j]+','+err.getMessage()+'\n'; And
List<Sobject> insertRecords
I have added all the error records to a string and then I have converted the string to a csv.
For inserting In have used the List<sobject> whixh I will be using in the database error loop to get each failed record.