We are using the Database.Insert(leads, false); We want only the the ids that where insert. We have a lot of leads to be checked if we use
for (Database.SaveResult result: results) {
if (result.isSuccess()) {
leadsInserted.add(result.getId());
}
}
This can take time depending on how many leads are being introduced. Do we have a better way ?