Nguyễn Văn Quang
Nguyễn Văn Quang

Reputation: 123

Acumatica PXselector, how to type new value into selector control

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

Upvotes: 0

Views: 1646

Answers (2)

Brendan
Brendan

Reputation: 5613

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; }

Upvotes: 4

Sin
Sin

Reputation: 1864

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"

enter image description here

Upvotes: 0

Related Questions