-->

Acumatica PXselector, how to type new value into s

2019-09-10 19:16发布

问题:

My DAC DMSRouteSetting.CS

#region RouteCD
        public abstract class routeCD : IBqlField { }
        [PXDBString(15)]
        [PXDefault, PXUIField(DisplayName = "Route ID", Required = true)]
        [PXSelector(typeof(Search4<DMSRouteSetting.routeCD, Aggregate<GroupBy<DMSRouteSetting.routeCD>>>))]
        public virtual string RouteCD { get; set; }

  #endregion

I want to select a exist value in selector or typing a new value. Current. I just select a exist value but can't typing a new value Can you help me? Thanks

回答1:

Try adding ValidateValue = false in your selector attribute

public abstract class routeCD : IBqlField { }
[PXDBString(15)]
[PXDefault, PXUIField(DisplayName = "Route ID", Required = true)]
[PXSelector(typeof(Search4<DMSRouteSetting.routeCD, Aggregate<GroupBy<DMSRouteSetting.routeCD>>>), ValidateValue = false)]
public virtual string RouteCD { get; set; }


回答2:

If i am not wrong, you cant directly add new values to selector, but you can set a property to show an icon next to selector which helps to open the Master Page and user can add it there.

Look for the property AllowAddNew="True" AllowEdit="True"



标签: acumatica