Skip to main content

We have an issue where some users enter a wanted date in the customer order in the past ( 2020Instead of 2021!)

perhaps I could create an event which fires a message to user? Would like to stop them altogether really so perhaps an event that doesn’t allow a past date?

Any ideas?
 

Hi @BLLBrucemo ,

 

I do not know of a way to configure a field to perform a validation test but your thought on using an event to evaluate the wanted date is spot on.  You'll have to evaluate on insert and updating.  You may also want to validate the order line wanted date as well.

 

Regards,

William Klotz


Great thanks, any ideas how I would write the code that would prevent entry of less than TODAY?? I have some ideas but not entirely sure how to write it 


Great thanks, any ideas how I would write the code that would prevent entry of less than TODAY?? I have some ideas but not entirely sure how to write it 

Should be as simple as setting up the event on the LU where the date will be set and then checking the entered date against variable #TODAY# or sysdate e.g.

BEGIN
IF '&NEW:DATE' < '#TODAY#'
THEN
Error_SYS.Appl_General('LogicalUnit', 'ERROR: The date must be greater than today');
END IF;
END;

 

 


Thanks! Works a treat