I created a new field and I want to initialize by default true
Thanks for your help.
Best answer by Hughes Beausejour
View originalI created a new field and I want to initialize by default true
Thanks for your help.
Best answer by Hughes Beausejour
View originalSolved. thank you very much.
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 username or e-mail address. We'll send you an e-mail with instructions to reset your password.