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.
Page 1 / 1
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!!
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
@thanhaim Can you please share your source code that you are showing the error message?
Below warning source code.
@Naveen Boga I use ShowWarning. Thank you for your help.
Hi @thanhaim Great; thanks for sharing the update.