I have a custom unbound field on the Kit Specifications grid UsrQtyOnHand.
public class INKitSpecStkDetExtCummings : PXCacheExtension<PX.Objects.IN.INKitSpecStkDet>
{
#region UsrQtyOnHand
[PXDecimal]
[PXUIField(DisplayName = "Qty On Hand", Enabled = false)]
[PXDefault(typeof(Search<INItemStats.qtyOnHand,
Where<INItemStats.inventoryID, Equal<Current<INKitSpecStkDet.compInventoryID>>>>),
PersistingCheck = PXPersistingCheck.Nothing)]
[PXFormula(typeof(Sum<INItemStats.qtyOnHand>))]
public virtual Decimal? UsrQtyOnHand { get; set; }
public abstract class usrQtyOnHand : PX.Data.BQL.BqlDecimal.Field<usrQtyOnHand> { }
#endregion
}
I want to go to the INItemStats table and pull the QtyOnHand value for the current inventory id on the grid line.
I can do it in the row selected handler, but I don’t know why my PXDefault is not working.
I added a PXFormula but that didn’t help.
What am I doing wrong?
Best answer by Leonardo Justiniano
View original