Reputation: 1
I created a custom field and trying to add the warehouse selector to it.I try to read from the customization guide and tried it but,the selector does not show up in the custom field. This is the code I tried. #region UsrCustomSite [PXDBInt] [PXUIField(DisplayName="Warehouse", Visibility = PXUIVisibility.SelectorVisible)] [PXSelector(typeof(Search<IN.INSite.siteCD>),typeof(IN.INSite.descr),DescriptionField =(typeof(IN.INSite.siteCD)),SubstituteKey =(typeof(IN.INSite.siteCD)),DirtyRead =true)] public virtual int? UsrCustomSite { get; set; } public abstract class usrCustomSite : PX.Data.BQL.BqlInt.Field { } #endregion Am I missing something here?
Upvotes: 0
Views: 382
Reputation: 1066
I would try changing
[PXSelector(typeof(Search<IN.INSite.siteCD>)
to
[PXSelector(typeof(Search<IN.INSite.siteID>
)
You are storing an int so you want the id, the substitute Key setting will make it so that the UI will show the CD.
Upvotes: 0