# Create ARAdjusment with Code **Category:** [Epicor ERP 10](https://www.epiusers.help/c/e10/5) **Created:** 2017-01-11 23:04 UTC **Views:** 606 **Replies:** 0 **URL:** https://www.epiusers.help/t/create-aradjusment-with-code/36879 --- ## Post #1 by @zetaru hi everybody i wondering if i can create Adjusment with code, im a trying with this block of code but got this error: A valid Transaction Amount is Required this is my code: // the amount variable is the adjust amount of one of my invoices... double amount = 0.580; EpiTextBox txtKeyField = (EpiTextBox)csm.GetNativeControlReference("46567b2e-6bc0-4967-be35-a0ec6843838f"); int InvoiceNum = Convert.ToInt32(txtKeyField.Text); ARAdjustmentAdapter ARA = new ARAdjustmentAdapter(this.oTrans); ARA.BOConnect(); ARA.GetNewCashDtl1(InvoiceNum); ARA.ARAdjustmentData.Tables["CashDtl"].Rows[0].BeginEdit(); ARA.ARAdjustmentData.Tables["CashDtl"].Rows[0]["TranAmt"] = amount; ARA.ARAdjustmentData.Tables["CashDtl"].Rows[0]["DocTranAmt"] = amount; ARA.ARAdjustmentData.Tables["CashDtl"].Rows[0]["Discount"] = amount; ARA.ARAdjustmentData.Tables["CashDtl"].Rows[0]["DocDiscount"] = amount; ARA.ARAdjustmentData.Tables["CashDtl"].Rows[0]["DocDispTranAmt"] = amount; ARA.ARAdjustmentData.Tables["CashDtl"].Rows[0]["DocInvoiceBal"] = amount; // ARA.ARAdjustmentData.Tables["CashDtl"].Rows[ARA.ARAdjustmentData.Tables["CashDtl"].Rows.Count-1]["TranAmt"] = amount; // ARA.ARAdjustmentData.Tables["CashDtl"].Rows[ARA.ARAdjustmentData.Tables["CashDtl"].Rows.Count-1]["DocTranAmt"] = amount; ARA.ARAdjustmentData.Tables["CashDtl"].Rows[0].EndEdit(); ARA.Update(); ARA.Dispose(); thanks in advance --- **Canonical:** https://www.epiusers.help/t/create-aradjusment-with-code/36879 **Original content:** https://www.epiusers.help/t/create-aradjusment-with-code/36879