I would like to modify the ShippedQty field by putting the same value as the OpenOrderQty field after adding the line, but that does nothing. I removed the PXDefault. The value stay at 0.00.
protected void SOShipLine_RowInserted(PXCache cache, PXRowInsertedEventArgs e, PXRowInserted InvokeBaseHandler)
{
if(InvokeBaseHandler != null)
InvokeBaseHandler(cache, e);
var row = (SOShipLine)e.Row;
if (row==null) {return;}
row.ShippedQty=row.OpenOrderQty;
}
Thanks. Xavier
I would like to suggest you to not set the ShippedQty because it might have some implications as it is a calculated field. Instead, you can create a custom field and set the value of OpenOrderQty to that field.