Solved

How to add a red flag error to an incorrect date.

  • 26 October 2021
  • 3 replies
  • 52 views

Userlevel 1

So apparently my client has had more than 1 issue with his employees imputing the wrong date in a field. Like 2120 instead of 2021. How can I create a customization that red flags this and doesn’t allow a save. Something like if date doesn’t equal 2021 -2022, red flag. I think I’d like to implement this system wide to any date field, thoughts? Thanks!

icon

Best answer by Naveen Boga 25 November 2021, 14:27

View original

3 replies

Userlevel 7
Badge +9

Hi @mylescarroll22 , It is better to advise the users to use a Date selector instead of keying.

Thanks

Userlevel 1

Thanks Chandra, We’ve already made that suggestion, but it’s happened since, and I don’t think we’re going to teach this user a new trick. I think the modification should be easy, as the system already yellow flags the problem, I’d just like to change it from a yellow flag to a hard stop.

 

Userlevel 7
Badge +17

Hi @mylescarroll22 , To hard stop the user, you can have a logic in field verifying/persisting event.

Here is the sample code for your reference.

	if (Condition)  // add the required condition here
{
sender.RaiseExceptionHandling<SOOrder.orderDate>(doc, null, new PXSetPropertyException(ErrorMessages.IncorrectDateProvided));
}

 

 

Reply


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