

I created a new field and I want to initialize by default true
Thanks for your help.
I created a new field and I want to initialize by default true
Thanks for your help.
Best answer by Hughes Beausejour
For database bound field (PXDBBool) add PXDefault attribute to the DAC field declaration:
[PXDefault(true)]
For unbound field (PXBool) add PXUnboundDefault attribute instead:
[PXUnboundDefault(true)]
Example:
#region IsActive
public abstract class isActive : PX.Data.BQL.BqlBool.Field<isActive> { }
[PXDBBool()]
[PXDefault(true)]
[PXUIField(DisplayName = "Active")]
public virtual bool? IsActive { get; set; }
#endregion
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.