if (value != null && value.getModelEntity().getHasFieldWithAuditLog()) {
createEntityAuditLogAll(value, false, false);
}
try {
value = helper.create(value);
} catch (GenericEntityException e) {
// see if this was caused by an existing record before resetting the sequencer and trying again
// NOTE: use the helper directly so ECA rules, etc won't be run
GenericValue existingValue = helper.findByPrimaryKey(value.getPrimaryKey());
if (existingValue == null) {