【发布时间】:2017-06-27 02:39:38
【问题描述】:
我需要将自定义字段添加到 InItemLotSerial 表。我已向 InItemLotSerial 添加了一个扩展表,以通过自定义页面接受自定义值。
我接受 InventoryItem 中每个序列号的自定义数据
我在 POReceiptEntry 扩展中添加了以下事件,以填充 Inventory Item 中自定义字段的值。
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;
}
}
}
});
在调试时触发事件并将值分配给自定义字段,但在保存购买收据时会引发错误。
`
`
【问题讨论】:
标签: acumatica