0
我需要將自定義字段添加到InItemLotSerial表中。我已經爲InItemLotSerial添加了一個擴展表來通過自定義頁面接受自定義值。將自定義字段數據保存到InItemLotSerial表中時出錯
我已經添加在POReceiptEntry擴展以下事件從庫存項目填寫的自定義字段的值。
Base.RowInserted.AddHandler<ItemLotSerial>((sender, e) =>
{
var serialrow = (ItemLotSerial)e.Row;
if (serialrow != null)
{
InfoINItemLotSerialExtNV serextrow = PXCache<INItemLotSerial>.GetExtension<InfoINItemLotSerialExtNV>(serialrow);
InventoryItem itm = PXSelect<InventoryItem, Where<InventoryItem.inventoryID, Equal<Required<InventoryItem.inventoryID>>>>.Select(Base, serialrow.InventoryID);
if (itm != null)
{
InfoInventoryItemAttributeExtNV extrow = PXCache<InventoryItem>.GetExtension<InfoInventoryItemAttributeExtNV>(itm);
if (extrow != null)
{
serextrow.SearchType = extrow.SearchType;
serextrow.DiamondColor = extrow.DiamondColor;
}
}
}
});
在調試事件時觸發並將值分配給自定義字段,但在保存購買收據時引發錯誤。
`
`