In the code I’m trying to Extend InventoryItem DAC to include the AlternateID from INItemXRef
I created a customization project, and added the required code, the new field showing in the InventoryItem fields,
Code:
public class InventoryItemExt : PXCacheExtension<InventoryItem>
{
#region CustomAlternateID
[PXString(50, IsUnicode = true)]
[PXUIField(DisplayName = "GTIN/EAN/UPC/ISBN")]
[PXSelector(
typeof(Search<INItemXRef.alternateID,
Where<INItemXRef.inventoryID, Equal<Current<InventoryItem.inventoryID>>,
And<INItemXRef.alternateType, Equal<INAlternateType.gIN>>>>),
typeof(INItemXRef.alternateID),
SubstituteKey = typeof(INItemXRef.alternateID))]
public virtual string CustomAlternateID { get; set; }
public abstract class customAlternateID : PX.Data.BQL.BqlString.Field<customAlternateID> { }
#endregion
}
But it always return empty when I use it in the GI or view in screen

Hope if someone can advise on what is missing in the code , thanks in advance