Loading ...

How To Validate Input On Insert

Hello everybody,

today I want to document small feature in Acumatica which I can call validation of insert. 

As usually if you need to validate some logic of insertion you can use something like RowXXXXd event. But for simple validations you can use PXUIVerify attribute. Below goes example take from Acumatica itself:

[PXUIVerify(typeof (Where<LandedCostTran.curyLCAmount, NotEqual<decimal0>>), 
PXErrorLevel.Error, "The value must be greater than zero", new System.Type[] {}, CheckOnInserted = false)]

What this command says to you is pretty obvious:

Verify at ui level ( generate javascript verification code ) that value at LandedCostTran.CuryLCAmount is not equal to zero. 

CheckOnInserted = false says that checking on insertion should not be done.

Ready to take your Acumatica experience to the next level? If this blog sparked ideas for customizations that could streamline your processes or enhance your system’s functionality, we’d love to hear from you! Share your unique requirements with us, and let’s collaborate to bring your vision to life. Leave a customization request today and let’s build something extraordinary together!