How i calculate ExtendedPrice with this formula:
*UnitPrice = UnitPrice Quantity - Discount*, where discount field is percentage
I have tried to add this code to Before record Added and before record updated* bi it was not works :
$values["ExtendedPrice"] = $values["UnitPrice"] * $values["Quantity"] - ($values["Discount"];
For example :
UnitPrice : 1000
Quantity : 10
Discount :10%
ExtendedPrice should be : 9000