Hi,
I have customized a new tab called ‘Discount’ to my custom data entry screen. There are two fields called Discount Amount and discount percentage in the grid as below.
When I changed a value of discount percentage, I want to set value to discount amount based on discountable amount just after the field updated. For that I used below code but it get executed when adding a new row.
protected void APProformaDiscount_DisctPercent_FieldUpdated(PXCache cache, PXFieldUpdatedEventArgs e)
{
var row = (APProformaDiscount)e.Row;
APProforma item = APProformas.Current;
decimal? amount = (row.DiscountableAmt * row.DisctPercent) / 100;
//row.DisctAmt = amount;
cache.SetValue<APProformaDiscount.disctAmt>(row, amount);
}
Even I tried with cache.SetValueExt but it also didn’t work.
Note: this is custom graph
Can someone help me on this to find a solution please?
Thank you.