I created a new field and I want to initialize by default true
Thanks for your help.
Page 1 / 1
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
Solved. thank you very much.
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.