For one of our projects, we set a single value to be selected from a box. However the box is still defaulting to one of the old value that we removed. I’m trying to have it default to the constant defined below, but everything I’ve tried either hasn’t worked or crashed the customization. Any way to set a default value for this box?
public class custClass : PX.Data.BQL.BqlString.Constant<custClass>
{
public custClass() : base("SB") { }
}
[PXDBString(2, IsKey = true, IsFixed = true, InputMask=">aa")]
[PXDefault(SOOrderTypeConstants.SalesOrder, typeof(SOSetup.defaultOrderType))]
[PXSelector(typeof(Search2<SOOrderType.orderType,
InnerJoin<SOOrderTypeOperation, On2<SOOrderTypeOperation.FK.OrderType, And<SOOrderTypeOperation.operation, Equal<SOOrderType.defaultOperation>>>>,
Where<FeatureInstalled<FeaturesSet.inventory>.Or<SOOrderType.behavior.IsNotEqual<SOBehavior.bL>>>>))]
[PXRestrictor(typeof(Where<SOOrderTypeOperation.iNDocType, NotEqual<INTranType.transfer>, Or<FeatureInstalled<FeaturesSet.warehouse>>>), ErrorMessages.ElementDoesntExist, typeof(SOOrderType.orderType))]
[PXRestrictor(typeof(Where<SOOrderType.orderType, Equal<custClass>>),"" )]
[PXRestrictor(typeof(Where<SOOrderType.requireAllocation, NotEqual<True>, Or<AllocationAllowed>>), ErrorMessages.ElementDoesntExist, typeof(SOOrderType.orderType))]
[PXRestrictor(typeof(Where<SOOrderType.active,Equal<True>>), null)]
[PXUIField(DisplayName = "Order Type", Visibility = PXUIVisibility.SelectorVisible)]
[PX.Data.EP.PXFieldDescription]
