Dont refresh value field when after show warning

  • 4 April 2023
  • 5 replies

Userlevel 3

hi expert.

I have problem in below image. I custom warning if value field Weight and Volume negative, when I type 0.000000 → show warning → recent value field Weight in screen = 0.00100 (old value). I dont want refresh value this field. ( recent value field Weight in screen = 0.000000).

Can you help me?

Thank you so much.



Best answer by Naveen Boga 6 April 2023, 04:07

View original

5 replies

Userlevel 7
Badge +17

Hi @thanhaim Once an error occurred, caches will rollback hence the value will be changed to old value.

The best option is to show a warning message instead of raising an error message.


Hope this helps!! 

Userlevel 3

hi @Naveen Boga .

 Thank you for your ideal. I just test it. When Weight <= 0 warning message will show, but I continue type Weight = -5 then record saved successfully. 

I think:

  • raising an error message prevent user type wrong
  • PXUIFieldAttribute.SetWarning is only show warning, wrong data still saved.


Can you help me show warning and prevent user save wrong data? Thankyou so much

Userlevel 7
Badge +17

@thanhaim  Can you please share your source code that you are showing the error message?


Below warning source code.


Userlevel 3

@Naveen Boga I use ShowWarning. Thank you for your help.

Userlevel 7
Badge +17

Hi @thanhaim  Great; thanks for sharing the update.


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved