Skip to main content

I created a new field and I want to initialize by default true
Thanks for your help.

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