Updating tax amount in the sales order field is not a good idea. CuryTaxTotal field in sales order is calculated field. It is calculated from SOTaxTran lines. So, in order to update tax amount in sales order you actually need to insert SOTaxTran lines into Taxes view of the SOOrderEntry graph.
Something like that:
//indicate that taxes are inserted in manual mode
TaxAttribute.SetTaxCalc<SOLine.taxCategoryID>(graph.Transactions.Cache, null, TaxCalc.ManualCalc);
// insert SOTaxTran
SOTaxTran newTaxTran= new SOTaxTran();
newTaxTran.TaxRate = 0.1; //put your actual values here
newTaxTran.CuryTaxableAmt = 100; //put your actual values here
newTaxTran.CuryTaxAmt = 10; //put your actual values here
var taxTran = graph.Taxes.Insert(newTaxTran);
--
Terrance
CRM Admin | Apps4Rent