Skip to main content
Answer

Can't search for Inventory Items using AlternateIDs (Barcode) in Issues screen

  • February 21, 2025
  • 2 replies
  • 69 views

When entering a Barcode value in the Inventory ID field on the Issues (IN302000) screen, the error raised:


i tried to do a customization to add that feature by adding the AlternateID and the CrossItemAttribute using this code:

 

public class INIssueEntryExtension : PXGraphExtension<PX.Objects.IN.INIssueEntry>
{
[PXMergeAttributes(Method = MergeMethod.Append)]
[CrossItem(Filterable = true, BqlField = typeof(INTran.inventoryID))]
[PXDimensionSelector(InventoryAttribute.DimensionName,
typeof(Search2<InventoryItem.inventoryID,
LeftJoin<INItemXRef,
On<INItemXRef.inventoryID, Equal<InventoryItem.inventoryID>>>>),
typeof(InventoryItem.inventoryCD),
typeof(INItemXRef.alternateID),
typeof(InventoryItem.descr))]
[PXUIField(DisplayName = "Inventory or Alternate ID")]
protected virtual void _(Events.CacheAttached<INTran.inventoryID> e) { }
}


The AlternateID column succssefully appears with values in the lookup (as the following screenshot), but when searching using an alternateIDs, it doesn’t find the Item.

 



Anyone can  help with this?

Best answer by arsln

I got it working using this code:

 


[CrossItem(INPrimaryAlternateType.CPN, Filterable = true, BqlField = typeof(INTran.inventoryID))]
protected virtual void INTran_InventoryID_CacheAttached(PXCache sender)
{
}

even that the Inventory transactions have no customer or vendors, it works.

2 replies

  • Author
  • Jr Varsity I
  • Answer
  • February 23, 2025

I got it working using this code:

 


[CrossItem(INPrimaryAlternateType.CPN, Filterable = true, BqlField = typeof(INTran.inventoryID))]
protected virtual void INTran_InventoryID_CacheAttached(PXCache sender)
{
}

even that the Inventory transactions have no customer or vendors, it works.


Chris Hackett
Community Manager
Forum|alt.badge.img
  • Acumatica Community Manager
  • February 24, 2025

Thank you for sharing your solution with the community ​@arsln!