if ($result->errorMsg == '' && empty($result->fieldErrors)) { $result->errorMsg .= sprintf(_t('crud.rowCouldNotBeUpdated'), _t('crud.incomeexpense.tableDescription', 'Incomeexpense')) . "\n"; } } } } } else { // if ($row->id > 0) // Convert the value object into the actual entity. $newRow = new Incomeexpense(); $newRow->loadFromArray((array) $row); if (function_exists('preInsertHook')) { preInsertHook(); } try { $success = $incomeexpenseDAO->insert($newRow); } catch (Exception $ex) { $success = false; } if ($success) { $row->id = $newRow->id; $justInsertedRowId = $newRow->id; if (function_exists('postInsertHook')) { postInsertHook(); } if ($success) { $db->commitTransaction(); $committed = true; $result->successMsg .= sprintf(_t('crud.newRowAdded'), _t('crud.incomeexpense.tableDescription', 'Incomeexpense')) . "\n"; } }