Skip to main content

I want to create a custom field using the [Inventory] attribute so that I get the selector and it is all sorted out for me.  I don’t want it to be PXDBInt.  I want it to be a virtual field of type PXInt.

        #region UsrModEquipTempID
        /Inventory]
        yPXUIField(DisplayName = "Model Equipment")]
        public int? UsrModEquipTempID { get; set; }
        public abstract class usrModEquipTempID : PX.Data.BQL.BqlInt.Field<usrModEquipTempID> { }
        #endregion

If I put ÂPXInt], it causes a compiler error.  

How can I do that?

 

 

Hi @Joe Schmucker  Yes, InventoryID] will not work with unbound field fields.

You can your DAC like below.

 

       #region FirstItem

PXInt()]
PXSelector(typeof(Search<InventoryItem.inventoryID, Where<InventoryItem.stkItem, Equal<True>,
And<InventoryItem.itemStatus, Equal<AMIConstants.ActiveStatus>>>>), new Typep] { typeof(InventoryItem.inventoryCD), typeof(InventoryItem.descr) }, SubstituteKey = typeof(InventoryItem.inventoryCD))]
PXUIField(DisplayName = "Select Item", Required = true)]
public virtual int? FirstItem { get; set; }
public abstract class firstItem : IBqlField { }

#endregion

 


@Naveen Boga Thank you so much for giving me the code!  


Reply