从 InventTable 调用 OrigCountryRegionId

Call OrigCountryRegionId from InventTable

我正在尝试根据 OrigCountryRegionIdLanguageID 字段从 table LogisticsAddressCountryRegionTranslation 中检索字段 ShortName 的值,LanguageIdCustPackingSlipJour.

中检索

我无法从 InventTable 检索 OrigCountryRegionId

方法 InventTable 存在于 table CustPackingSlipTrans 上,所以我想检索 ItemId 上字段 OrigCountryRegionId 的值,这在 CustPackingSlipTrans table.

InventTable 方法中返回

我有一段代码,但不确定如何实现上述解决方案。

salesPackingSlipTmp.OrigCountryRegionName = LogisticsAddressCountryRegionTranslation::find(CustPackingSlipTrans*I am lost here*, CustPackingSlipJour.LanguageId, false).ShortName;

inventTable 方法 returns InventTable 缓冲区,因此您可以像这样检索字段:

CustPackingSlipTrans.inventTable().fieldName

因此您的代码如下所示:

salesPackingSlipTmp.OrigCountryRegionName = LogisticsAddressCountryRegionTranslation::find(CustPackingSlipTrans.inventTable().OrigCountryRegionId, CustPackingSlipJour.LanguageId, false).ShortName;