Skip to main content
Answer

Issue with InventoryID Selector After Customization in INTran

  • February 5, 2025
  • 2 replies
  • 69 views

Forum|alt.badge.img

Hello Acumatica Community,

I am working on a customization where I modify the InventoryID field in INTran. The customization works fine on the Transfer (IN304000) screen, but when applied to Receipt (IN301000) and other screens, the InventoryID selector appears empty.

Here is my code:

[PXNonInstantiatedExtension]
public class IN_INTran_ExistingColumn : PXCacheExtension<PX.Objects.IN.INTran>
{
#region InventoryID
[PXDefault()]
[StockItem(DisplayName = "Inventory ID")]
[PXSelector(typeof(Search2<InventoryItem.inventoryID,
InnerJoin<InventoryItemCurySettings,
On<InventoryItem.inventoryID, Equal<InventoryItemCurySettings.inventoryID>>>,
Where<InventoryItemCurySettings.dfltSiteID, Equal<Current<INRegister.siteID>>>>),
typeof(InventoryItem.inventoryCD),
typeof(InventoryItem.descr),
SubstituteKey = typeof(InventoryItem.inventoryCD))]
public int? InventoryID { get; set; }
#endregion
}

Question:

How can I modify my customization to ensure that the InventoryID selector works correctly across all screens (IN304000, IN301000, etc.)?

Has anyone faced a similar issue when customizing INTran? Any guidance or alternative approaches would be appreciated!

Thanks in advance!

Best answer by DipakNilkanth

Hi ​@tharinduweerasooriya90,

I believe the Inventory ID selector appears empty on other screens because of the selector query.

You may need to modify it for each screen. Currently, you are using <Current<INRegister.siteID> in your query, but on the Receipts screen, INRegister.siteID is not available. As a result, it is not fetching values for Inventory ID.

Hope this helps!

2 replies

DipakNilkanth
Pro III
Forum|alt.badge.img+13
  • Pro III
  • Answer
  • February 5, 2025

Hi ​@tharinduweerasooriya90,

I believe the Inventory ID selector appears empty on other screens because of the selector query.

You may need to modify it for each screen. Currently, you are using <Current<INRegister.siteID> in your query, but on the Receipts screen, INRegister.siteID is not available. As a result, it is not fetching values for Inventory ID.

Hope this helps!


Forum|alt.badge.img+8
  • Captain II
  • February 5, 2025

@tharinduweerasooriya90 

Alongside what ​@Nilkanth Dipak said, you could also use a cache attached event to limit the functionality to just one screen rather than the whole DAC.

 

Hope this helps.

Aleks