Loading ...

Make PXDefault As Not Required For Input

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

Ready to take your Acumatica customization to the next level? Whether you need help with default values, field requirements, or any other customization, our team is here to bring your vision to life. Leave us a customization request today, and let’s build solutions that work exactly the way you need them to. Your ideal Acumatica experience is just a click away—let’s make it happen!