I don’t use FieldSelecting (almost never) and I think I should have been using it a lot more. However, When I set the Qty on a line in Bills and Adjustments, it just displays it on screen, and if you add a cost, it doesn’t extend the cost out.
You can see it defaults the Qty to 1. But when you add an item, the extended cost is 0.

Here is my method:
protected void APTran_Qty_FieldSelecting(PXCache cache, PXFieldSelectingEventArgs e)
{
var row = (APTran)e.Row;
if (row == null) return;
if (row.Qty == null || row.Qty == 0)
{
e.ReturnValue = 1m;
}
}
If I do this in the RowInserting it works, because I can actually update the cache.
protected void APTran_RowInserting(PXCache cache, PXRowInsertingEventArgs e)
{
var row = (APTran)e.Row;
if (row == null) return;
if (row.Qty == null || row.Qty == 0)
{
cache.SetValueExt<APTran.qty>(row, 1m);
}
}
If FieldSelecting is not updating the cache, then what does it do?