Make PXDefault As Not Required For Input
25 March 2015
Hello everybody,
Imagine following situation, you added to your DAC field some default value. For example like this:
[PXDBDate] [PXDefault(typeof(AccessInfo.businessDate))] public virtual DateTime? FromDate
And now you have default value as current date. But what, if you don't like to make it required for input. How to achieve this goal? The answer is quite simple, you just need to add PersistingCheck = PXPersistingCheck.Nothing into pxdefault attribute. Like this:
[PXDBDate] [PXDefault(typeof(AccessInfo.businessDate), PersistingCheck = PXPersistingCheck.Nothing)] public virtual DateTime? FromDate
With such changes you can init your values at form, and make it not required for input