如何在 where 条件下使用扩展 table 字段?

How to use extended table fields in where condition?

我通过创建新的 table InfoINItemLotSerialExtNV 扩展了 INItemLotSerial table。 Table 在 InventoryID 和 LotSerialNbr 上左联接。

我正在尝试在 where 条件中使用扩展 table 字段。这些字段未显示在 INItemLotSerial 中。我是否必须再次 link table 使用 join 或仅在 where 条件下使用 InfoINItemLotSerialExtNV?

在 BQL 表达式中,您必须通过扩展 class 中的 BQL 名称来引用自定义字段。示例请参考Acumatica Customization Guide。文档中显示的做法既可以应用于常规 DAC 扩展,也可以应用于映射到扩展 table.

的 DAC 扩展

假设您通过像这样声明 InfoINItemLotSerialExtNV 来扩展 INItemLotSerial DAC:

class InfoINItemLotSerialExtNV : PXCacheExtension<INItemLotSerial>

只要 INItemLotSerial 可访问,InfoINItemLotSerialExtNV 中包含的自定义字段就应该可以访问。加载基本 DAC 时,扩展 DAC 字段由框架加载。

您的查询应如下所示:

PXSelect<INItemLotSerial, Where<InfoINItemLotSerialExtNV.customField, Equal< ... >>