【发布时间】:2020-09-12 21:05:36
【问题描述】:
在自定义中,我已经覆盖了 SO Line 库存 ID RowUpdating 事件的行为,以便为特定条件将备用 ID 设置为不同的值。为此,我创建了一个继承自 AlternativeItemAttribute 的新属性类,并将新类用于 AlternateID。新的属性类会覆盖 RowUpdating 方法来执行此操作。
在被覆盖的方法中,我使用 Fluent BQL 执行了一些查询,但它们似乎只是挂起。示例:
InventoryItemMaint itemGraph = PXGraph.CreateInstance<InventoryItemMaint>();
InventoryItem item = itemGraph.Item.Select<InventoryItem>()
.Where(i => i.InventoryID == newRow.InventoryID)
.FirstOrDefault();
我最终用常规 BQL 替换它来解决它(见下文),但我宁愿使用 F-BQL,而且我想知道我是否做错了什么。
InventoryItem item = new PXSelectReadonly<InventoryItem,
Where<InventoryItem.inventoryID, Equal<Required<InventoryItem.inventoryID>>>>(itemGraph)
.SelectSingle(newRow.InventoryID);
【问题讨论】:
-
您是否尝试过使用 Acumatica 请求分析器或 SQL 分析器来查看发生了什么?这是一个相对简单的选择,不应该那样挂。
标签: acumatica