Is there a way to modify total tax field in order form by myself. With code
var totalamount = Xrm.Page.getAttribute('totallineitemamount').getValue(); var totalvat = 0.24 * totalamount; Xrm.Page.getAttribute('totaltax').setValue(totalvat);
I want to take Total detail amount and multiply it by 0.24 and save the result to the total tax field.
With that code the calculation works, then the result goes to the total tax field so I can see that the formula works, but finaly the total tax field becomes empty.
The code is triggered by recalculate button.