We are trying to implement an "InventoryCD" (string) field in a custom page (not an Inventory ID Int field). We need this InventoryCD field to to work just like the Stock Item InventoryCD field (field mask for segment display and selector for existing items). Currently the issue is the same aspx PXSegmentMask and DAC attributes are not working the same. We are using InventoryRawAttribute on our field the exact same way found on the InventoryItemMaint cache attached for InventoryItem.InventoryCD. The only exception is the Inventory CD field is NOT a key in our custom page.
Our problem is the display of our Inventory CD field for the segment mask only displays when we are not entering or focused on the field (user has to click move to another field). This makes it difficult for users to follow which segments they are entering values into. So my question is what are we missing?
Here is what we have done so far:
(1) DAC - InventoryCD (same as InventoryItem.InventoryCD from InventoryItemMaint cache attached - except IsKey = false):
public abstract class inventoryCD : PX.Data.IBqlField
{}
protected String _InventoryCD;
[PXDefault()]
[InventoryRaw(typeof(Where<InventoryItem.stkItem, Equal<True>>), DisplayName = "Inventory ID", Filterable = true)]
public virtual String InventoryCD
{
get
{
return this._InventoryCD;
}
set
{
this._InventoryCD = value;
}
}
(2) Page - InventoryCD (Copied from stock items IN202500):
<px:PXSegmentMask ID="edInventoryCD" runat="server" DataField="InventoryCD"
DataSourceID="ds" AutoRefresh="true" >
<GridProperties FastFilterFields="InventoryCD,Descr" />
</px:PXSegmentMask>
Here is a sample of the results I am seeing (refer to the image below). Note what the fields look like when entering values or just clicking into the field. On our custom page, clicking into the Inventory CD field shows no segmented separation. Doing the same on the Stock Item page will show the segmented separation so the user can following the segments. How do we get the segmented display to work in our custom page?
EDIT: If you set ValidComboRequired = true in InventoryRawAttribute the mask displays correctly the same as stock item, however you loose the selector for all items and the selector then becomes a selector for each item segment value (making the issue worse). Just an FYI in case anyone can see some type of combination I need as it might relate to ValidComboRequired (the mask when true, and the selector when false).
EDIT2: Tried making the field a key (but not the only key in the DAC) and no difference





